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
@@ -37,19 +37,19 @@ test("serves package assets with a safe content type", async () => {
|
||||
});
|
||||
|
||||
test("published JavaScript runtimes bundle relative chunks by default", async () => {
|
||||
const entry=fileURLToPath(new URL("./fixtures/plugin-runtime/entry.js",import.meta.url));
|
||||
const assets=mergePluginAssets([{id:"published",entry}],[]);
|
||||
const response=await servePluginAsset(assets,"/__wrnexus/assets/published.js","development");
|
||||
const entry = fileURLToPath(new URL("./fixtures/plugin-runtime/entry.js", import.meta.url));
|
||||
const assets = mergePluginAssets([{ id: "published", entry }], []);
|
||||
const response = await servePluginAsset(assets, "/__wrnexus/assets/published.js", "development");
|
||||
expect(response?.status).toBe(200);
|
||||
const source=await response!.text();
|
||||
const source = await response!.text();
|
||||
expect(source).toContain("published-runtime-chunk-loaded");
|
||||
expect(source).not.toMatch(/from\s+["']\.\/chunk\.js["']/);
|
||||
});
|
||||
|
||||
test("explicit bundle false preserves prebuilt runtime modules", async () => {
|
||||
const entry=fileURLToPath(new URL("./fixtures/plugin-runtime/entry.js",import.meta.url));
|
||||
const assets=mergePluginAssets([{id:"raw",entry,bundle:false}],[]);
|
||||
const response=await servePluginAsset(assets,"/__wrnexus/assets/raw.js","development");
|
||||
const entry = fileURLToPath(new URL("./fixtures/plugin-runtime/entry.js", import.meta.url));
|
||||
const assets = mergePluginAssets([{ id: "raw", entry, bundle: false }], []);
|
||||
const response = await servePluginAsset(assets, "/__wrnexus/assets/raw.js", "development");
|
||||
expect(await response!.text()).toContain('from "./chunk.js"');
|
||||
});
|
||||
|
||||
@@ -98,13 +98,13 @@ test("collectScripts ships zero framework JavaScript for static markup by defaul
|
||||
|
||||
test("collectScripts adds navigation in explicit client mode", () => {
|
||||
expect(collectScripts("<main>Server rendered</main>", [], { mode: "client" })).toEqual([
|
||||
"/__wrnexus/nav.js",
|
||||
expect.stringMatching(/^\/__wrnexus\/nav\.js\?v=[a-f0-9]{16}$/),
|
||||
]);
|
||||
});
|
||||
|
||||
test("collectScripts auto-adds navigation when a page already needs a browser runtime", () => {
|
||||
expect(collectScripts('<button data-scope="{}">Count</button>')).toEqual([
|
||||
"/__wrnexus/nav.js",
|
||||
expect.stringMatching(/^\/__wrnexus\/nav\.js\?v=[a-f0-9]{16}$/),
|
||||
"/__wrnexus/reactive.js",
|
||||
]);
|
||||
});
|
||||
Reference in new issue
Block a user