Created
March 2, 2018 16:06
-
-
Save bruceharris/5d95880def344ecf3bf9d45211db2aef to your computer and use it in GitHub Desktop.
React Unit Testing Example 5
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 isLoading is true', () => { | |
describe('given 200ms have not yet elapsed', () => { | |
it('should render nothing', () => { | |
const wrapper = mount( | |
<LoadingIndicator isLoading={true}> | |
<div>ahoy!</div> | |
</LoadingIndicator> | |
); | |
expect(wrapper.html()).toBe(null); | |
wrapper.unmount(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment