Created
September 9, 2019 01:06
-
-
Save aaronkelton/754ce171c22e60e6aa73dc14644d868d 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
import React from 'react' | |
import { shallow } from 'enzyme' | |
import HelloReact from 'packs/hello_react' | |
describe('HelloReact component', () => { | |
describe('when a name is given as a prop', () => { | |
it('renders Hello Aaron!', () => { | |
expect(shallow(<HelloReact name="Aaron" />).text()).toBe('Hello Aaron!') | |
}) | |
}) | |
describe('when no name is given', () => { | |
it('renders Hello David!', () => { | |
expect(shallow(<HelloReact />).text()).toBe('Hello David!') | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment