Skip to content

Commit 4464be0

Browse files
committed
Add tests
1 parent d7d9e28 commit 4464be0

File tree

3 files changed

+44
-21
lines changed

3 files changed

+44
-21
lines changed

test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,18 @@ test('renders with string gap prop', t => {
2727
const a = render(<Grid gap='1em' />).toJSON()
2828
t.snapshot(a)
2929
})
30+
31+
test('renders with align prop', t => {
32+
const a = render(<Grid align='baseline' />).toJSON()
33+
t.snapshot(a)
34+
})
35+
36+
test('Grid.Item renders', t => {
37+
const a = render(<Grid.Item />).toJSON()
38+
t.snapshot(a)
39+
})
40+
41+
test('Grid.Item renders with span prop', t => {
42+
const a = render(<Grid.Item span={2} />).toJSON()
43+
t.snapshot(a)
44+
})

test.js.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,73 @@ The actual snapshot is saved in `test.js.snap`.
44

55
Generated by [AVA](https://ava.li).
66

7-
## renders
7+
## Grid.Item renders
88

99
> Snapshot 1
1010
1111
<div
12-
className="sc-bdVaJa gbAoJg"
13-
width={256}
12+
className="sc-bwzfXH hWsLvJ"
1413
/>
1514

16-
## renders with gutter prop
15+
## renders
1716

1817
> Snapshot 1
1918
2019
<div
21-
className="sc-bdVaJa hMURNT"
22-
width={256}
20+
className="sc-bdVaJa juUzWM"
21+
width={320}
2322
/>
2423

25-
## renders with string gutter prop
24+
## renders with align prop
2625

2726
> Snapshot 1
2827
2928
<div
30-
className="sc-bdVaJa hBZALA"
31-
width={256}
29+
className="sc-bdVaJa jokDsC"
30+
width={320}
3231
/>
3332

34-
## renders with string width prop
33+
## renders with gap prop
3534

3635
> Snapshot 1
3736
3837
<div
39-
className="sc-bdVaJa hZHJBF"
40-
width="40em"
38+
className="sc-bdVaJa ecTFWC"
39+
width={320}
4140
/>
4241

43-
## renders with width prop
42+
## renders with string gap prop
4443

4544
> Snapshot 1
4645
4746
<div
48-
className="sc-bdVaJa eMRWET"
47+
className="sc-bdVaJa fupyDp"
4948
width={320}
50-
/
49+
/>
5150

52-
## renders with gap prop
51+
## renders with string width prop
5352

5453
> Snapshot 1
5554
5655
<div
57-
className="sc-bdVaJa hMURNT"
58-
width={256}
56+
className="sc-bdVaJa ewMiHe"
57+
width="40em"
5958
/>
6059

61-
## renders with string gap prop
60+
## renders with width prop
61+
62+
> Snapshot 1
63+
64+
<div
65+
className="sc-bdVaJa juUzWM"
66+
width={320}
67+
/
68+
69+
## Grid.Item renders with span prop
6270

6371
> Snapshot 1
6472
6573
<div
66-
className="sc-bdVaJa hBZALA"
67-
width={256}
74+
className="sc-bwzfXH vVdAr"
75+
span={2}
6876
/>

test.js.snap

65 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)