Created
May 22, 2017 10:48
-
-
Save visualskyrim/3bd88c26310b7f2d1ffc734363e7f127 to your computer and use it in GitHub Desktop.
Use Enzyme to test React/Redux container - dive
This file contains hidden or 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
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