Last active
February 8, 2016 15:29
-
-
Save kenwheeler/eab91734e662d7483c8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { shallow } from "enzyme"; | |
import OurComponent from "../our-component"; | |
describe("<OurComponent/>", () => { | |
it("should render children when supplied the items prop", () => { | |
let mockData = [ | |
{ name: "test" }, | |
{ name: "test" } | |
]; | |
let wrapper = shallow(<OurComponent items={mockData}/>); | |
let items = wrapper.findWhere((component) => { | |
return component.props().children === "test"; | |
}); | |
expect(items.length).to.equal(2); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment