Skip to content

Instantly share code, notes, and snippets.

@Lukeghenco
Last active January 16, 2019 01:02
Show Gist options
  • Save Lukeghenco/868801c957415d36441c3766edab7fd1 to your computer and use it in GitHub Desktop.
Save Lukeghenco/868801c957415d36441c3766edab7fd1 to your computer and use it in GitHub Desktop.
Enzyme/React-Testing-Libary Step: 11
it('renders a placeholder correctly', () => {
const placeholderText = 'I am placeholder text'
const { getByLabelText } = render(<TextAreaInput {…defaultProps} placeholder={placeholderText} />)
const textareaInput = getByLabelText(defaultProps.labelText)
expect(textareaInput.placeholder).toEqual(placeholderText)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment