forked from wednesday-solutions/react-native-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fonts.test.js
59 lines (54 loc) · 2.12 KB
/
fonts.test.js
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import fonts from './fonts';
describe('Tests for fonts', () => {
it('should have the correct font-size', () => {
expect(fonts.size.small()).toEqual(
expect.arrayContaining([expect.stringContaining('font-size: 14px;')])
);
expect(fonts.size.regular()).toEqual(
expect.arrayContaining([expect.stringContaining('font-size: 17px;')])
);
expect(fonts.size.big()).toEqual(
expect.arrayContaining([expect.stringContaining('font-size: 20px;')])
);
expect(fonts.size.large()).toEqual(
expect.arrayContaining([expect.stringContaining('font-size: 24px;')])
);
});
it('should have the correct font-weight', () => {
expect(fonts.weights.light()).toEqual(
expect.arrayContaining([expect.stringContaining('font-weight: light;')])
);
expect(fonts.weights.bold()).toEqual(
expect.arrayContaining([expect.stringContaining('font-weight: bold;')])
);
expect(fonts.weights.normal()).toEqual(
expect.arrayContaining([expect.stringContaining('font-weight: normal;')])
);
});
it('should have the correct font-weight and font-size', () => {
expect(fonts.style.heading()).toEqual(
expect.arrayContaining([expect.stringContaining('font-weight: bold;')])
);
expect(fonts.style.heading()).toEqual(
expect.arrayContaining([expect.stringContaining('font-size: 24px;')])
);
expect(fonts.style.subheading()).toEqual(
expect.arrayContaining([expect.stringContaining('font-weight: bold;')])
);
expect(fonts.style.subheading()).toEqual(
expect.arrayContaining([expect.stringContaining('font-size: 20px;')])
);
expect(fonts.style.standard()).toEqual(
expect.arrayContaining([expect.stringContaining('font-size: 17px;')])
);
expect(fonts.style.standard()).toEqual(
expect.arrayContaining([expect.stringContaining('font-weight: normal;')])
);
expect(fonts.style.subText()).toEqual(
expect.arrayContaining([expect.stringContaining('font-size: 14px;')])
);
expect(fonts.style.subText()).toEqual(
expect.arrayContaining([expect.stringContaining('font-weight: normal;')])
);
});
});