-
-
Save whtswrng/4f8029b6e329629a85ac89bbc1d4fb52 to your computer and use it in GitHub Desktop.
react-testing-1
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
describe("when input changed", () => { | |
it("should change property name in the state", () => { | |
const componentWrapper = shallow(<Login />); | |
componentWrapper.find('#email').simulate('change', {target: {name: 'email', value: 'blah@gmail.com'}}); | |
expect(componentWrapper.state('email')).toEqual('blah@gmail.com'); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment