release: WRNexusJS 0.8.0
Quality / quality (ubuntu-latest) (push) Failing after 21s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-02 23:18:51 +05:30
parent 87507edf59
commit 586a6db8ff
625 changed files with 243608 additions and 11210 deletions
+21
View File
@@ -7,6 +7,27 @@ import { generate, parse } from "../src/index.ts";
import { compileWireFile } from "../src/index.ts";
import { mountHtml } from "@wrnexus/test";
test("explicit static rendering disables hydration metadata", () => {
const output = compileWireFile(`page StaticPage {
render = "static"
state count = 0
view { <button @click="count++">{count}</button> }
}`);
expect(output).toContain('export const __wrnexusRender = "static"');
expect(output).toContain('data-wrn-hydrate="none"');
expect(output).toContain('export const __wrnexusHydrate = "none"');
});
test("named data loads compile as parallel typed data entries", () => {
const output = compileWireFile(`page Users {
load users { return ["Ada"] }
load server teams { return ["Core"] }
view { <p>Users</p> }
}`);
expect(output).toContain("await Promise.all");
expect(output).toContain('return { "users": __values[0], "teams": __values[1] }');
});
let seq = 0;
/** Compile a `.wrn` source and import the resulting module. */
async function compileAndImport(src: string): Promise<Record<string, unknown>> {