mirror of
https://github.com/zhigang1992/react-content-loader.git
synced 2026-05-08 12:00:22 +08:00
* Improvement tests * Add Istanbul: Code Coverage Tool * Fix tests * Uid test * Removed istanbul in the depencies
27 lines
641 B
JavaScript
27 lines
641 B
JavaScript
import 'jsdom-global/register'
|
|
import React from 'react'
|
|
|
|
import Enzyme, { mount } from 'enzyme'
|
|
import Adapter from 'enzyme-adapter-react-16'
|
|
|
|
import chai, { expect } from 'chai'
|
|
import chaiEnzyme from 'chai-enzyme'
|
|
import sinon from 'sinon'
|
|
|
|
Enzyme.configure({ adapter: new Adapter() })
|
|
chai.use(chaiEnzyme())
|
|
|
|
import CodeStyle from '../../src/stylized/CodeStyle'
|
|
|
|
describe('<CodeStyle />:', () => {
|
|
const wrapper = mount(<CodeStyle speed={20} />)
|
|
|
|
it('has nine `rect`', () => {
|
|
expect(wrapper.find('clipPath rect')).to.have.length(9)
|
|
})
|
|
|
|
it('prop is propagated', () => {
|
|
expect(wrapper.props().speed).to.equal(20)
|
|
})
|
|
})
|