Created
January 5, 2017 18:11
-
-
Save Gethyl/19e60c3d01597f5f6c37b39239b78e62 to your computer and use it in GitHub Desktop.
Dumb Component Home.js testing.
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('>>>H O M E --- Shallow Render REACT COMPONENTS',()=>{ | |
let wrapper | |
const output = 10 | |
beforeEach(()=>{ | |
wrapper = shallow(<Home output={output}/>) | |
}) | |
it('+++ render the DUMB component', () => { | |
expect(wrapper.length).toEqual(1) | |
}); | |
it('+++ contains output', () => { | |
expect(wrapper.find('input[placeholder="Output"]').prop('value')).toEqual(output) | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment