Skip to content

Commit 5db62d8

Browse files
committed
Added test for error case
1 parent d277fb6 commit 5db62d8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

__tests__/index.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,5 +212,11 @@ describe('Unit tests for Validation class', () => {
212212
state = Object.assign({}, state, result);
213213
expect(Validator.isFieldValid(state, 'login')).toEqual(true);
214214
});
215+
216+
test('Validator.isFieldValid(state,"asdasd") method throws error due to attempt to validate not existed field', () => {
217+
expect(() => {
218+
Validator.isFieldValid(state, 'asdasd');
219+
}).toThrow();
220+
});
215221
});
216222
});

0 commit comments

Comments
 (0)