Skip to content

Instantly share code, notes, and snippets.

@ralfting
Created September 24, 2019 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralfting/131f087a96809f85a8ede536e02c4cd7 to your computer and use it in GitHub Desktop.
Save ralfting/131f087a96809f85a8ede536e02c4cd7 to your computer and use it in GitHub Desktop.
describe('Email badge', () => {
it('adds two email', () => {
const { container, getByTestId } = render(<EmailInput setTo={jest.fn()} {...props} />);
container.querySelector('input').value = 'example1@pipefy.com,';
fireEvent.keyUp(container.querySelector('input'), {
key: 'Backspace',
});
container.querySelector('input').value = 'example2@pipefy.com,';
fireEvent.keyUp(container.querySelector('input'), {
key: 'Backspace',
});
expect(getByTestId('[data-testid="email-compose-badge"]')).toHaveLength(2)
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment