Skip to content

Commit 8cfb1e8

Browse files
committed
test: check consts for production
1 parent d76bf34 commit 8cfb1e8

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

tests/consts.test.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
import { describe, expect, test } from "vitest";
2-
import { DEFAULT_OPTS } from "../src/consts";
2+
import {
3+
DEFAULT_OPTS,
4+
GRID_CELL_SIZE,
5+
LINE_WIDTHS,
6+
OFFSETS,
7+
} from "../src/consts";
38

49
describe("default production values", () => {
510
test("prefix", () => {
611
expect(DEFAULT_OPTS).toHaveProperty("prefix");
712
expect(DEFAULT_OPTS.prefix).toBe("bg-");
813
});
14+
15+
test("line widths", () => {
16+
expect(LINE_WIDTHS).toEqual([
17+
0.5, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16,
18+
]);
19+
});
20+
21+
test("grid cell sizes", () => {
22+
expect(GRID_CELL_SIZE).toEqual([...Array(128)].map((_, i) => i + 1));
23+
});
24+
25+
test("offsets", () => {
26+
expect(OFFSETS).toEqual([...Array(128 + 16)].map((_, i) => i + 1));
27+
});
928
});

0 commit comments

Comments
 (0)