Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test('good email format', () => {
- const actual = getSignupFormFieldErrors({
- username: 'foo',
- email: 'foo@example.com',
- password: 'pass',
- passwordConfirmation: 'pass',
- });
- const expected = {};
- expect(actual).toEqual(expected);
- });
- test('bad email format', () => {
- const actual = getSignupFormFieldErrors({
- username: 'foo',
- email: 'foo@example',
- password: 'pass',
- passwordConfirmation: 'pass',
- });
- const expected = {
- email: BAD_FORMAT,
- };
- expect(actual).toEqual(expected);
- });
Add Comment
Please, Sign In to add comment