Created
May 30, 2016 10:30
-
-
Save kanerogers/b3c4bec8666e0bdab2138b7ee313f06d to your computer and use it in GitHub Desktop.
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
// Continued from the gist above.. | |
it('maps state to props correctly', () => { | |
const TEST_TODOS = [ | |
{ id: 0, text: 'Learn Redux' }, | |
{ id: 1, text: 'Learn TDD' }, | |
]; | |
const TEST_STATE = { todos: TEST_TODOS }; | |
// Here's how Redux's connect method will define the props for your component. | |
const props = mapStateToProps(TEST_STATE); | |
expect(props.todos).to.eql(TEST_STATE); // Note the deep equality (eql) operator here. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment