2023-12-28 10:43:11 +00:00
|
|
|
import { assertEquals } from "std/assert/assert_equals.ts";
|
|
|
|
|
2024-09-20 18:15:25 +00:00
|
|
|
import { flavorEntries, flavors, version } from "@catppuccin/palette";
|
2024-02-12 21:03:48 +00:00
|
|
|
import palette from "@/palette.json" with { type: "json" };
|
2023-12-28 10:43:11 +00:00
|
|
|
|
|
|
|
Deno.test("flavorEntries", () => {
|
|
|
|
flavorEntries
|
|
|
|
.map(([flavorName, flavor]) =>
|
|
|
|
flavor.colorEntries
|
|
|
|
.map(([colorName, color]) =>
|
|
|
|
assertEquals(palette[flavorName].colors[colorName].hex, color.hex)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
Deno.test("flavors", () => {
|
|
|
|
flavorEntries.map(([flavorName]) => {
|
|
|
|
assertEquals(
|
|
|
|
flavors[flavorName].name,
|
|
|
|
palette[flavorName].name,
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
2024-09-20 18:15:25 +00:00
|
|
|
|
|
|
|
Deno.test("version", () => {
|
2024-09-21 02:30:54 +00:00
|
|
|
assertEquals(version, "1.4.0"); // x-release-please-version
|
2024-09-20 18:15:25 +00:00
|
|
|
});
|