-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtest.js
44 lines (36 loc) · 982 Bytes
/
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
import test from 'ava'
import React from 'react'
import { create as render } from 'react-test-renderer'
import Grid from './src'
test('renders', t => {
const a = render(<Grid />).toJSON()
t.snapshot(a)
})
test('renders with width prop', t => {
const a = render(<Grid width={320} />).toJSON()
t.snapshot(a)
})
test('renders with string width prop', t => {
const a = render(<Grid width='40em' />).toJSON()
t.snapshot(a)
})
test('renders with gap prop', t => {
const a = render(<Grid gap={16} />).toJSON()
t.snapshot(a)
})
test('renders with string gap prop', t => {
const a = render(<Grid gap='1em' />).toJSON()
t.snapshot(a)
})
test('renders with align prop', t => {
const a = render(<Grid align='baseline' />).toJSON()
t.snapshot(a)
})
test('Grid.Item renders', t => {
const a = render(<Grid.Item />).toJSON()
t.snapshot(a)
})
test('Grid.Item renders with span prop', t => {
const a = render(<Grid.Item span={2} />).toJSON()
t.snapshot(a)
})