release: WRNexusJS 0.7.0

This commit is contained in:
2026-08-01 10:04:42 +05:30
parent c54144f2e4
commit 87507edf59
207 changed files with 12607 additions and 679 deletions
@@ -73,3 +73,20 @@ test("collectScripts omits client navigation in document mode", () => {
expect(scripts).not.toContain("/__wrnexus/nav.js");
});
test("collectScripts ships zero framework JavaScript for static markup by default", () => {
expect(collectScripts('<main><a href="/about">About</a></main>')).toEqual([]);
});
test("collectScripts adds navigation in explicit client mode", () => {
expect(collectScripts("<main>Server rendered</main>", [], { mode: "client" })).toEqual([
"/__wrnexus/nav.js",
]);
});
test("collectScripts auto-adds navigation when a page already needs a browser runtime", () => {
expect(collectScripts('<button data-scope="{}">Count</button>')).toEqual([
"/__wrnexus/nav.js",
"/__wrnexus/reactive.js",
]);
});