Skip to content

Instantly share code, notes, and snippets.

@Lukeghenco
Last active January 16, 2019 01:02
Show Gist options
  • Save Lukeghenco/17fc2c24582270378f51a06b2791976d to your computer and use it in GitHub Desktop.
Save Lukeghenco/17fc2c24582270378f51a06b2791976d to your computer and use it in GitHub Desktop.
Enzyme/React-Testing-Libary Step: 12
it('renders the value prop in the textarea as text', () => {
const value = 'This is a comment'
const { getByLabelText } = render(<TextAreaInput {…defaultProps} value={value} />)
const textareaInput = getByLabelText(defaultProps.labelText)
expect(textareaInput.value).toEqual(value)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment