refactor: migrate legacy wire namespace to wrn
Quality / quality (ubuntu-latest) (push) Failing after 9m49s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-12 18:51:15 +05:30
parent ec23dd4c93
commit 2c960fc1dc
488 changed files with 27306 additions and 19063 deletions
@@ -2,13 +2,13 @@ import { expect, test } from "bun:test";
import { HMR_CLIENT_JS, collectScripts } from "../src/runtime.ts";
test("accent controls load the shared theme runtime", () => {
expect(collectScripts('<button data-wire-accent-set="rose">Rose</button>')).toContain(
expect(collectScripts('<button data-wrn-accent-set="rose">Rose</button>')).toContain(
"/__wrnexus/theme.js",
);
});
test("accent clear controls load the shared theme runtime", () => {
expect(collectScripts("<button data-wire-accent-clear>Reset</button>")).toContain(
expect(collectScripts("<button data-wrn-accent-clear>Reset</button>")).toContain(
"/__wrnexus/theme.js",
);
});
@@ -20,9 +20,9 @@ test("HMR preserves the active browser theme and accent", () => {
expect(HMR_CLIENT_JS).toMatch(/var nextLang\s*=\s*doc\.documentElement\.getAttribute\("lang"\)/);
expect(HMR_CLIENT_JS).toMatch(/typeof\s+window\.wireTheme\.bind\s*===\s*"function"/);
expect(HMR_CLIENT_JS).toMatch(/typeof\s+window\.wrnTheme\.bind\s*===\s*"function"/);
expect(HMR_CLIENT_JS).toMatch(/window\.wireTheme\.bind\(document\)/);
expect(HMR_CLIENT_JS).toMatch(/window\.wrnTheme\.bind\(document\)/);
expect(HMR_CLIENT_JS).toContain('new CustomEvent("wrnexus:hmr-updated"');
});