Files
react-content-loader/tests/stylized/InstagramStyle.js
Danilo Woznica 2d3baf7039 Feat/rtl (#104)
* Improv code

* feat(Wrap): RTL direction

* test(Tests): Code style

* test(RTL): Add test
2018-09-29 14:33:22 +01:00

30 lines
736 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"
Enzyme.configure({ adapter: new Adapter() })
chai.use(chaiEnzyme())
import InstagramStyle from "../../src/stylized/InstagramStyle"
describe("<InstagramStyle />", () => {
const wrapper = mount(<InstagramStyle speed={20} />)
it("has three `rect`", () => {
expect(wrapper.find("clipPath rect")).to.have.length(3)
})
it("has one `circle`", () => {
expect(wrapper.find("clipPath circle")).to.have.length(1)
})
it("prop is propagated", () => {
expect(wrapper.props().speed).to.equal(20)
})
})