error handling in auth

This commit is contained in:
realaravinth
2021-06-28 23:03:15 +05:30
parent d298ef4719
commit c581d8d0a3
12 changed files with 51 additions and 15 deletions

View File

@@ -21,6 +21,8 @@ import emailExists from './emailExists';
import {mockAlert, getRegistrationFormHtml} from '../../../setUpTests';
import setup from '../../../components/error/setUpTests';
fetchMock.enableMocks();
mockAlert();
@@ -32,6 +34,8 @@ it('finds exchange', async () => {
fetchMock.mockResponseOnce(JSON.stringify({exists: true}));
document.body.innerHTML = getRegistrationFormHtml();
document.querySelector('body').appendChild(setup());
const emailField = <HTMLInputElement>document.getElementById('email');
emailField.setAttribute('value', 'test@a.com');