1 // Unit test
2 describe('SomeComponent' () => {
3 it('validates model on button click', () => {
4 const handleSubmit = jest.fn();
5 const wrapper = mount(
6 <Login handleSubmit={handleSubmit}/>
7 );
8 const instance = wrapper.instance();
9 const submitBtn = app.find('#sign-in')
10 submitBtn.simulate('click')
11 expect(handleSubmit).toHaveBeenCalled();
12 });
13 }
14