forked from Lilly-Protocol/lily-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelevation.test.ts
More file actions
23 lines (19 loc) · 876 Bytes
/
Copy pathelevation.test.ts
File metadata and controls
23 lines (19 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import fs from "node:fs";
import path from "node:path";
import { describe, expect, it } from "vitest";
describe("Design System Elevation Tokens", () => {
const cssPath = path.resolve(__dirname, "globals.css");
const cssContent = fs.readFileSync(cssPath, "utf-8");
it("defines 4-tier elevation scale tokens (--shadow-1 through --shadow-4)", () => {
expect(cssContent).toContain("--shadow-1:");
expect(cssContent).toContain("--shadow-2:");
expect(cssContent).toContain("--shadow-3:");
expect(cssContent).toContain("--shadow-4:");
});
it("maintains backward-compatible --shadow-soft alias mapped to low elevation", () => {
expect(cssContent).toContain("--shadow-soft: var(--shadow-1);");
});
it("maps .surface class to shadow token", () => {
expect(cssContent).toMatch(/\.surface\s*\{[^}]*box-shadow:\s*var\(--shadow-soft\)/);
});
});