refactor: migrate legacy wire namespace to wrn
This commit is contained in:
@@ -74,7 +74,7 @@ test("resolveThemeName validates against configured names", () => {
|
||||
expect(resolveThemeName(undefined, t)).toBe(t.default);
|
||||
});
|
||||
|
||||
test("renderThemeCss emits :root + per-theme blocks and --wire-* vars", () => {
|
||||
test("renderThemeCss emits :root + per-theme blocks and --wrn-* vars", () => {
|
||||
const t = resolveThemeConfig({
|
||||
default: "dark",
|
||||
themes: { dark: { "color-primary": "#6c8cff" } },
|
||||
@@ -82,9 +82,9 @@ test("renderThemeCss emits :root + per-theme blocks and --wire-* vars", () => {
|
||||
const css = renderThemeCss(t);
|
||||
expect(css).toContain(":root{");
|
||||
expect(css).toContain('[data-theme="dark"]{');
|
||||
expect(css).toContain("--wire-color-primary:#6c8cff");
|
||||
expect(css).toContain("--wrn-color-primary:#6c8cff");
|
||||
expect(css).toContain("color-scheme:dark"); // reserved token → native property
|
||||
expect(css).toContain("font-family:var(--wire-font-sans");
|
||||
expect(css).toContain("font-family:var(--wrn-font-sans");
|
||||
});
|
||||
|
||||
test("active theme CSS contains only the selected theme and accent", () => {
|
||||
@@ -101,7 +101,7 @@ test("active theme CSS contains only the selected theme and accent", () => {
|
||||
test("renderThemeRuntime bakes the theme names for cycling", () => {
|
||||
const t = resolveThemeConfig();
|
||||
const js = renderThemeRuntime(t);
|
||||
expect(js).toContain("data-wire-theme-toggle");
|
||||
expect(js).toContain("data-wrn-theme-toggle");
|
||||
expect(js).toContain(JSON.stringify(t.names));
|
||||
expect(js).toContain('addEventListener("wrnexus:navigated"');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user