-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathaccessibility.test.tsx
More file actions
44 lines (42 loc) · 969 Bytes
/
accessibility.test.tsx
File metadata and controls
44 lines (42 loc) · 969 Bytes
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
39
40
41
42
43
44
import { renderCurrentTest } from "./_tailwind";
describe("Accessibility - Screen Readers", () => {
test("sr-only", async () => {
const result = await renderCurrentTest();
expect(result).toStrictEqual({
props: {
style: {
borderWidth: 0,
height: 1,
margin: -1,
overflow: "hidden",
padding: 0,
position: "absolute",
width: 1,
},
},
warnings: {
properties: ["clip", "white-space"],
},
});
});
test("not-sr-only", async () => {
const result = await renderCurrentTest();
expect(result).toStrictEqual({
props: {
style: {
margin: 0,
overflow: "visible",
padding: 0,
},
},
warnings: {
properties: ["clip", "white-space"],
values: {
position: "static",
width: "auto",
height: "auto",
},
},
});
});
});