Created
February 27, 2018 13:02
-
-
Save atmd83/3de76a24e062271497dae1e43b05282d to your computer and use it in GitHub Desktop.
medium failed test
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('when the state changes', () => { | |
it('it renders correctly', () => { | |
component = shallow(<Thing value={3} />); | |
expect(component.find('h1').text()).toEqual('The value is 3'); | |
// lets alter the state | |
component.setState({ message: 'You have a value of' }); | |
// remember our shouldComponentUpdate() rejects any update | |
// unless the prop value has changed | |
expect(component.find('h1').text()).toEqual('The value is 3'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment