Last active
June 1, 2017 20:34
-
-
Save nikfrank/615185a7cce30c3e75cc828cd8f6d69f to your computer and use it in GitHub Desktop.
React ugly async user scenario
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
it('can reset a TodoList', (done)=>{ | |
// .. set up component and store ... | |
const unsubscribe = reduxStore.subscribe(()=>{ | |
expect( reduxStore.getState().get('todos').size ) | |
.toEqual( TodoList.initState.get('todos').size ); | |
unsubscribe(); | |
done(); | |
}); | |
const resetButton = mountedComponent.find('button.reset').first(); | |
resetButton.simulate('click'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment