feat: release design system engine, studio and component contracts
This commit is contained in:
1 parent
ff1065fb27
commit
3943b946d6
693 files changed
+175546
-3894
No files matched your search
@@ -39,6 +39,24 @@ const manifest: ProdManifest = {
|
||||
|
||||
const server = { upgrade: () => false } as never;
|
||||
|
||||
test("navigation runtime uses a content version and revalidates its stable URL", async () => {
|
||||
const { collectScripts } = await import("../src/script-selection.ts");
|
||||
const href = collectScripts("", [], { mode: "client" })[0] as string;
|
||||
expect(href).toMatch(/^\/__wrnexus\/nav\.js\?v=[a-f0-9]{16}$/);
|
||||
const handlers = createProductionHandlers(manifest, {});
|
||||
const versioned = (await handlers.fetch(
|
||||
new Request("http://localhost" + href),
|
||||
server,
|
||||
)) as Response;
|
||||
expect(versioned.headers.get("cache-control")).toBe("no-cache");
|
||||
expect(await versioned.text()).toContain("loadedNavigationScripts");
|
||||
const stable = (await handlers.fetch(
|
||||
new Request("http://localhost/__wrnexus/nav.js"),
|
||||
server,
|
||||
)) as Response;
|
||||
expect(stable.headers.get("cache-control")).toBe("no-cache");
|
||||
});
|
||||
|
||||
test("supervised production runtime injects reconnecting DOM-morph support", async () => {
|
||||
const handlers = createProductionHandlers(manifest, { developmentRuntime: true });
|
||||
const response = await handlers.fetch(new Request("http://localhost/"), server);
|
||||
|
||||
Reference in new issue
Block a user