feat: centralize application framework primitives
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { parse } from "../src/index.ts";
|
||||
|
||||
test("pages accept concise authentication and permission guards", () => {
|
||||
const ast = parse(`page Dashboard {
|
||||
auth = true
|
||||
permission = "dashboard:read"
|
||||
view { <h1>Dashboard</h1> }
|
||||
}`);
|
||||
expect(ast.security).toEqual({ auth: "required", permission: "dashboard:read" });
|
||||
});
|
||||
Reference in New Issue
Block a user