release: WRNexusJS 0.2.28

This commit is contained in:
2026-07-14 15:13:58 +05:30
parent d3094010af
commit 56027531ef
56 changed files with 175 additions and 95 deletions
+31
View File
@@ -212,3 +212,34 @@ component ParentCard {
expect(output).toContain('title="${__wireAttr(title)}"');
});
test("parses a layout block", () => {
const ast = parse(`
layout AppLayout {
view {
<main>{content}</main>
}
}
`);
expect(ast.kind).toBe("layout");
expect(ast.name).toBe("AppLayout");
});
test("layouts compile as reusable render modules", () => {
const output = generate(
parse(`
layout AppLayout {
view {
<main>{content}</main>
}
}
`),
);
expect(output).toContain('export const __wrnexusLayout = "AppLayout"');
expect(output).toContain("${__wireRaw(content)}");
expect(output).toContain("export function render");
});