-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsts.test.ts
38 lines (32 loc) · 857 Bytes
/
consts.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { describe, expect, test } from "vitest";
import {
DEFAULT_OPTS,
DOT_SIZES,
LINE_WIDTHS,
OFFSETS,
SPACING,
SQUARE_SIZES,
} from "../src/consts";
describe("default production values", () => {
test("prefix", () => {
expect(DEFAULT_OPTS).toHaveProperty("prefix");
expect(DEFAULT_OPTS.prefix).toBe("bg-");
});
test("line widths", () => {
expect(LINE_WIDTHS).toEqual([
0.5, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16,
]);
});
test("dot sizes", () => {
expect(DOT_SIZES).toEqual([...Array(96)].map((_, i) => i + 1));
});
test("square sizes", () => {
expect(SQUARE_SIZES).toEqual([...Array(96)].map((_, i) => i + 1));
});
test("offsets", () => {
expect(OFFSETS).toEqual([...Array(128 + 17)].map((_, i) => i));
});
test("spacing", () => {
expect(SPACING).toEqual([...Array(128 + 1)].map((_, i) => i));
});
});