Created
August 8, 2018 05:58
-
-
Save yangli-io/edf6caf265d02df9c725f52d6ff772e3 to your computer and use it in GitHub Desktop.
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
| it('should render a random id everytime', () => { | |
| const lastId = component.find('input').prop('id'); | |
| const secondComponent = shallow(<Input />); | |
| expect(secondComponent.find('input').prop('id')).to.equal(lastId); | |
| }); | |
| it('should link the id between label and input', () => { | |
| const labelHtmlFor = component.find('label').prop('htmlFor'); | |
| const inputId = component.find('input').prop('id'); | |
| expect(labelHtmlFor).to.equal(inputId); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment