|
| 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