-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove commented tests in hw 10 and remove backticks in readme
- Loading branch information
Showing
2 changed files
with
1 addition
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,57 +48,3 @@ describe('<Form />', () => { | |
}); | ||
}); | ||
}); | ||
|
||
// describe('<Form />', () => { | ||
// let wrapper; | ||
// const setState = jest.fn(); | ||
// const useStateSpy = jest.spyOn(React, 'useState') | ||
// useStateSpy.mockImplementation((init) => [init, setState]); | ||
// | ||
// beforeEach(() => { | ||
// wrapper = shallow(<Form />); | ||
// }); | ||
// | ||
// afterEach(() => { | ||
// jest.clearAllMocks(); | ||
// }); | ||
// | ||
// describe('Estados: ', () => { | ||
// it('El form deberia cambiar de estado cuando escriban en el input de username', () => { | ||
// wrapper.find('input[name="username"]').simulate('change', {target: {name: 'username', value: 'My new value'}}); | ||
// console.log(wrapper.find('input[name="username"]')); | ||
// expect(setState).toHaveBeenCalledWith({"username": "My new value", "password": ""}); | ||
// }); | ||
// it('El form deberia cambiar de estado cuando escriban en el input de password', () => { | ||
// wrapper.find('input[name="username"]').simulate('change', {target: {name: 'password', value: 'My new value'}}); | ||
// expect(setState).toHaveBeenCalledWith({"username": "", "password": "My new value"}); | ||
// }); | ||
// }); | ||
// | ||
// describe('Validacion: ', () => { | ||
// it('validate debe devolver un objeto con un error si el usarname no es un email valido:', () => { | ||
// expect(validate({ | ||
// username: 'dassadas', | ||
// password: 'hola1' | ||
// })).toEqual({username: 'Username is invalid'}); | ||
// }); | ||
// it('validate debe devolver un objeto con un error si el usarname esta vacio:', () => { | ||
// expect(validate({ | ||
// username: '', | ||
// password: 'hola1', | ||
// })).toEqual({username: 'Username is required'}); | ||
// }); | ||
// it('validate debe devolver un objeto con un error si el password no tiene un numero:', () => { | ||
// expect(validate({ | ||
// username: '[email protected]', | ||
// password: 'dassadas' | ||
// })).toEqual({password: 'Password is invalid'}); | ||
// }); | ||
// it('validate debe devolver un objeto con un error si el password esta vacio:', () => { | ||
// expect(validate({ | ||
// username: '[email protected]', | ||
// password: '' | ||
// })).toEqual({password: 'Password is required'}); | ||
// }); | ||
// }); | ||
// }); |