Created
June 11, 2019 05:07
-
-
Save eyaleizenberg/07899e25fb8549adf8a7f713ae22c401 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
import { HelloPerson } from './hello-person.component'; | |
import { shallow } from 'enzyme'; | |
describe('Hello Person', () => { | |
test('should render the name from the prop', () => { | |
const props = { | |
name: 'Jenia' | |
}; | |
const wrapper = shallow<HelloPerson>(<HelloPerson {...props} />); | |
const renderedName = wrapper.find('#name').text(); | |
expect(renderedName).toBe('Jenia'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment