import { readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; import path from "node:path"; import { describe, expect, test } from "vitest"; // Smoke test for the RTL/LTR variant registration in the root Tailwind config. // We don't spin up the Tailwind compiler here — that's covered by the web // app's build pipeline — but we *do* assert the variants are wired so the // next config refactor can't silently delete them. Coupled with `` in `apps/web/app/root.tsx`, this is the foundation for RTL // support. describe("RTL tailwind variants", () => { test("root tailwind.config.ts registers rtl: and ltr: variants", () => { const configPath = path.join(path.dirname(fileURLToPath(import.meta.url)), "../../../tailwind.config.ts"); const source = readFileSync(configPath, "utf8"); expect(source).toMatch(/addVariant\("rtl",/); expect(source).toMatch(/addVariant\("ltr",/); expect(source).toContain('[dir="rtl"]'); expect(source).toContain('[dir="ltr"]'); }); });