forked from badges/shields
-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.spec.js
69 lines (58 loc) · 1.51 KB
/
common.spec.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
60
61
62
63
64
65
66
67
68
69
import React from 'react'
import { shallow, render } from 'enzyme'
import { expect } from 'chai'
import * as common from './common'
import '../enzyme-conf.spec'
describe('Common modules', function() {
describe('<GlobalStyle />', function() {
it('renders', function() {
shallow(<common.GlobalStyle />)
})
})
describe('<BaseFont />', function() {
it('renders', function() {
shallow(<common.BaseFont />)
})
})
describe('<H2 />', function() {
it('renders', function() {
shallow(<common.H2 />)
})
})
describe('<H3 />', function() {
it('renders', function() {
shallow(<common.H3 />)
})
})
describe('<Badge />', function() {
it('renders', function() {
shallow(<common.Badge src="/badge/foo-bar-blue.svg" />)
})
it('contains a link to the image', function() {
const wrapper = render(<common.Badge src="/badge/foo-bar-blue.svg" />)
expect(wrapper.html()).to.contain(
'<img alt="" src="/badge/foo-bar-blue.svg">'
)
})
})
describe('<StyledInput />', function() {
it('renders', function() {
shallow(<common.StyledInput />)
})
})
describe('<InlineInput />', function() {
it('renders', function() {
shallow(<common.InlineInput />)
})
})
describe('<BlockInput />', function() {
it('renders', function() {
shallow(<common.BlockInput />)
})
})
describe('<VerticalSpace />', function() {
it('renders', function() {
shallow(<common.VerticalSpace />)
})
})
})