release: WRNexusJS 0.2.28

This commit is contained in:
Clintchiz committed 2026-07-14 15:13:58 +05:30
1 parent d3094010af
commit 56027531ef
56 files changed
+175 -95

No files matched your search

+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");
});