Guest User

Untitled

a guest
Mar 9th, 2018
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. test('good email format', () => {
  2. const actual = getSignupFormFieldErrors({
  3. username: 'foo',
  4. email: 'foo@example.com',
  5. password: 'pass',
  6. passwordConfirmation: 'pass',
  7. });
  8. const expected = {};
  9. expect(actual).toEqual(expected);
  10. });
  11. test('bad email format', () => {
  12. const actual = getSignupFormFieldErrors({
  13. username: 'foo',
  14. email: 'foo@example',
  15. password: 'pass',
  16. passwordConfirmation: 'pass',
  17. });
  18. const expected = {
  19. email: BAD_FORMAT,
  20. };
  21. expect(actual).toEqual(expected);
  22. });
Add Comment
Please, Sign In to add comment