diff --git a/.changeset/no-tests-in-dist.md b/.changeset/no-tests-in-dist.md new file mode 100644 index 00000000..f7c82aa9 --- /dev/null +++ b/.changeset/no-tests-in-dist.md @@ -0,0 +1,5 @@ +--- +"@tailor-platform/app-shell": patch +--- + +The published package no longer includes `dist/semantic-contrast.test.ts` and `dist/theme-bridge.test.ts`. These internal test files were copied into `dist/` by mistake. No public API or CSS changes. diff --git a/packages/core/src/assets/theme-bridge.test.ts b/packages/core/tests/theme-bridge.test.ts similarity index 95% rename from packages/core/src/assets/theme-bridge.test.ts rename to packages/core/tests/theme-bridge.test.ts index e67908c4..97c3634b 100644 --- a/packages/core/src/assets/theme-bridge.test.ts +++ b/packages/core/tests/theme-bridge.test.ts @@ -10,9 +10,9 @@ import { describe, expect, it } from "vitest"; * bridge entry would leave every other test green while the utility silently * stops producing colour. */ -const here = dirname(fileURLToPath(import.meta.url)); -const bridge = readFileSync(join(here, "theme.bridge.css"), "utf8"); -const defaultTheme = readFileSync(join(here, "themes/default.css"), "utf8"); +const assetsDir = join(dirname(fileURLToPath(import.meta.url)), "../src/assets"); +const bridge = readFileSync(join(assetsDir, "theme.bridge.css"), "utf8"); +const defaultTheme = readFileSync(join(assetsDir, "themes/default.css"), "utf8"); /** Semantic colour roles: 5 intents x 8 roles, named `--{intent}-{role}`. */ const SEMANTIC_PREFIX = "(?:info|success|warning|danger|neutral)"; @@ -75,7 +75,9 @@ describe("theme bridge", () => { ])("keeps %s linked to %s for consumer overrides", (alias, target) => { const sheets = [ defaultTheme, - ...["cream", "bloom"].map((name) => readFileSync(join(here, `themes/${name}.css`), "utf8")), + ...["cream", "bloom"].map((name) => + readFileSync(join(assetsDir, `themes/${name}.css`), "utf8"), + ), ]; const values = sheets.flatMap((css) => [...css.matchAll(new RegExp(`^\\s*${alias}:\\s*([^;]+);`, "gm"))].map((match) => diff --git a/packages/core/tests/typography-compile.test.ts b/packages/core/tests/typography-compile.test.ts index 1e1438c4..11470e81 100644 --- a/packages/core/tests/typography-compile.test.ts +++ b/packages/core/tests/typography-compile.test.ts @@ -8,7 +8,7 @@ import { describe, expect, it } from "vitest"; /** * Compiles theme.bridge.css with Tailwind and checks the emitted utility rules. - * The string-level checks in src/assets/theme-bridge.test.ts confirm that the + * The string-level checks in tests/theme-bridge.test.ts confirm that the * bridge names the right variables. This test confirms that Tailwind turns those * entries into the four declarations a role needs, both for AppShell's own * prefixed build (`astw:`) and for a consumer's unprefixed build.