refactor: migrate legacy wire namespace to wrn
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { readFileSync, readdirSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { compileWireFile } from "../../../packages/compiler/src/index.ts";
|
||||
import { parse as parseWireSyntax } from "../../../packages/syntax/src/parser.ts";
|
||||
import { compileWrnFile } from "../../../packages/compiler/src/index.ts";
|
||||
import { parse as parseWrnSyntax } from "../../../packages/syntax/src/parser.ts";
|
||||
|
||||
const root = join(import.meta.dir, "..");
|
||||
const pagesDir = join(root, "app", "pages");
|
||||
@@ -63,7 +63,7 @@ test("showcase configures local Lucide icon generation", () => {
|
||||
expect(packageJson.devDependencies["@iconify/tailwind4"]).toBeTruthy();
|
||||
expect(packageJson.devDependencies["@iconify-json/lucide"]).toBeTruthy();
|
||||
expect(styles).toContain('@plugin "@iconify/tailwind4";');
|
||||
expect(styles).toContain(".playground-preview-source > .wire-action:not(.w-full)");
|
||||
expect(styles).toContain(".playground-preview-source > .wrn-action:not(.w-full)");
|
||||
expect(styles).toContain('[data-ui-component="MetricGrid"]');
|
||||
expect(styles).toContain("width: 100%;");
|
||||
});
|
||||
@@ -160,7 +160,7 @@ test("playgrounds preserve typed values, safe DOM replacement, themes, and event
|
||||
expect(runtime).toContain("preview.replaceChildren");
|
||||
expect(runtime).not.toContain("preview.innerHTML");
|
||||
expect(runtime).toContain("__wrnexusHydrateScopes");
|
||||
expect(runtime).toContain("wireTheme?.bind?.(document)");
|
||||
expect(runtime).toContain("wrnTheme?.bind?.(document)");
|
||||
expect(runtime).toContain("bindPlaygroundEvents");
|
||||
expect(runtime).toContain('attributes.push(`${name}="${field.checked}"`)');
|
||||
});
|
||||
@@ -361,7 +361,7 @@ test("every generated showcase page compiles and is accepted by the route syntax
|
||||
|
||||
for (const path of paths) {
|
||||
const source = readFileSync(path, "utf8");
|
||||
expect(() => parseWireSyntax(source)).not.toThrow();
|
||||
expect(() => compileWireFile(source, path)).not.toThrow();
|
||||
expect(() => parseWrnSyntax(source)).not.toThrow();
|
||||
expect(() => compileWrnFile(source, path)).not.toThrow();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user