release: WRNexusJS 0.8.0
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { parse } from "../src/index.ts";
|
||||
|
||||
test("parses schema-backed server actions", () => {
|
||||
const ast = parse(`page Users {
|
||||
action createUser using CreateUserSchema { return { id: input.name } }
|
||||
view { <form @submit='createUser'><input name='name' /></form> }
|
||||
}`);
|
||||
expect(ast.actions[0]).toMatchObject({ name: "createUser", schema: "CreateUserSchema" });
|
||||
});
|
||||
Reference in New Issue
Block a user