release: WRNexusJS 0.8.0
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { analyzeRuntimeRequirements, generate, parse } from "../src/index.ts";
|
||||
|
||||
test("partial-static pages compile transparent static and streamed dynamic boundaries", () => {
|
||||
const ast = parse(
|
||||
`page Dashboard { render = "partial-static" view { <Static><header>Docs</header></Static><Dynamic><p>User</p></Dynamic> } }`,
|
||||
);
|
||||
expect(ast.renderMode).toBe("partial-static");
|
||||
expect(analyzeRuntimeRequirements(ast).kind).toBe("streaming-ssr");
|
||||
const output = generate(ast);
|
||||
expect(output).toContain("wrn-dynamic-region");
|
||||
expect(output).toContain("__wrnexusBuildStaticShell");
|
||||
expect(output).toContain('<wrn-dynamic-region data-wrn-dynamic="true"></wrn-dynamic-region>');
|
||||
expect(output).not.toContain('data-component="Static"');
|
||||
});
|
||||
Reference in New Issue
Block a user