16 lines
602 B
TypeScript
16 lines
602 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { containsRawPaletteValue } from "../../scripts/lib/design-system-source.ts";
|
|
|
|
describe("design-system source palette detection", () => {
|
|
it("rejects palette literals without treating URL fragments as colors", () => {
|
|
expect(containsRawPaletteValue('style={{ color: "#ff0000" }}')).toBe(true);
|
|
expect(containsRawPaletteValue('const css = "color: rgb(255 0 0)"')).toBe(true);
|
|
expect(
|
|
containsRawPaletteValue(
|
|
'path: "/projects/backend-skeleton/decisions#feed-pagination-boundary"',
|
|
),
|
|
).toBe(false);
|
|
});
|
|
});
|