1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-20 01:55:56 +07:00

fix: type lint for login

This commit is contained in:
Griffithtp
2019-06-23 22:44:53 +01:00
parent 116055c5d1
commit 91e603ef21
7 changed files with 77 additions and 61 deletions

View File

@@ -89,7 +89,7 @@ describe('<LoginModal />', () => {
const instance = wrapper.instance();
instance.submitCredentials = jest.fn();
const { validateCredentials, setCredentials, submitCredentials } = instance;
const { handleValidateCredentials, setCredentials, submitCredentials } = instance;
expect(setCredentials('username', eventUsername)).toBeUndefined();
expect(wrapper.state('form').username.value).toEqual('xyz');
@@ -97,7 +97,7 @@ describe('<LoginModal />', () => {
expect(setCredentials('password', eventPassword)).toBeUndefined();
expect(wrapper.state('form').password.value).toEqual('1234');
validateCredentials(event);
handleValidateCredentials(event);
expect(event.preventDefault).toHaveBeenCalled();
expect(wrapper.state('form').username.pristine).toEqual(false);
expect(wrapper.state('form').password.pristine).toEqual(false);