Skip to content

Commit 3a33b89

Browse files
smaniottodanilowoz
authored andcommitted
Add a test case for bullet list style component (#27)
1 parent 25e3842 commit 3a33b89

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

tests/stylized/BulletListStyle.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import React from 'react'
2+
3+
import { mount, render } from 'enzyme'
4+
import chai, { expect } from 'chai'
5+
import chaiEnzyme from 'chai-enzyme'
6+
import sinon from 'sinon'
7+
8+
chai.use(chaiEnzyme())
9+
10+
import BulletListStyle from '../../src/stylized/BulletListStyle'
11+
12+
describe('<BulletListStyle />:', () => {
13+
it('has a `svg`', () => {
14+
const wrapper = render(<BulletListStyle />)
15+
expect(wrapper.find('svg')).to.have.length(1)
16+
})
17+
18+
it('has a `rect` with `clip-path`', () => {
19+
const wrapper = render(<BulletListStyle />)
20+
expect(wrapper.find('rect[clip-path]')).to.have.length(1)
21+
})
22+
23+
it('has a `linearGradient`', () => {
24+
const wrapper = render(<BulletListStyle />)
25+
expect(wrapper.find('linearGradient')).to.have.length(1)
26+
})
27+
28+
it('has three `stop`', () => {
29+
const wrapper = render(<BulletListStyle />)
30+
expect(wrapper.find('stop')).to.have.length(3)
31+
})
32+
33+
it('has `stop` inside the `linearGradient`', () => {
34+
const wrapper = render(<BulletListStyle />)
35+
expect(wrapper.find('stop').parent().is('lineargradient')).to.equal(true)
36+
})
37+
38+
it('has four `circle`s followed by a `rect`', () => {
39+
const wrapper = render(<BulletListStyle />)
40+
expect(wrapper.find('circle + rect')).to.have.length(4)
41+
})
42+
})

0 commit comments

Comments
 (0)