release: WRNexusJS 0.5.0

This commit is contained in:
2026-07-29 12:51:10 +05:30
parent 76c768099d
commit 6afe32f63f
456 changed files with 40879 additions and 8850 deletions
@@ -0,0 +1,23 @@
import { expect, test } from "bun:test";
import { createDevAssetServer } from "../src/assets.ts";
test("UI CSS is read from its live source after an HMR change", async () => {
let css = ".wire-card { color: red; }";
const assets = createDevAssetServer(
process.cwd(),
"development",
undefined,
undefined,
() => css,
);
const first = await assets.serve("/__wrnexus/ui.css");
expect(await first?.text()).toContain("color: red");
css = ".wire-card { color: blue; }";
assets.invalidateCss();
const second = await assets.serve("/__wrnexus/ui.css");
expect(await second?.text()).toContain("color: blue");
expect(second?.headers.get("cache-control")).toBe("no-cache");
});