Skip to content

Instantly share code, notes, and snippets.

@visualskyrim
Created May 22, 2017 10:48
Show Gist options
  • Save visualskyrim/3bd88c26310b7f2d1ffc734363e7f127 to your computer and use it in GitHub Desktop.
Save visualskyrim/3bd88c26310b7f2d1ffc734363e7f127 to your computer and use it in GitHub Desktop.
Use Enzyme to test React/Redux container - dive
describe('ConnectedShowBox', () => {
it("should render a text box with empty string inside if string is not provided by store", () => {
const testState = {
searchBox: {}
};
const store = createMockStore(testState)
const component = shallowWithStore(<ConnectedShowBox />, store);
expect(component).to.be.a('object');
expect(component.dive().find("").prop("value")).to.equal("")
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment