Last active
August 29, 2015 14:10
-
-
Save trotzig/d5cc595c0c8c4fc6da16 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
describe('Button', () => { | |
describe('with a `text` prop', => { | |
it('renders the text', () => { | |
var button = React.addons.TestUtils.renderIntoDocument( | |
<Button text="Click me" /> | |
); | |
expect(button).toHaveText('Click me'); | |
}); | |
describe('and an `icon` prop', () => { | |
it('renders the icon', () => { | |
var button = React.addons.TestUtils.renderIntoDocument( | |
<Button | |
text="Click me" | |
icon="email" | |
/> | |
); | |
expect(button).toHaveIcon('email'); | |
}); | |
it('renders the text', () => { | |
var button = React.addons.TestUtils.renderIntoDocument( | |
<Button | |
text="Click me" | |
icon="email" | |
/> | |
); | |
expect(button).toHaveText('Click me'); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment