Skip to content

Commit

Permalink
test: More test
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Nov 12, 2020
1 parent 70cfb26 commit a1a6891
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion __tests__/validator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,27 @@ describe('validator', () => {
return true;
},
},
// Customize with empty message
{
validator() {
return false;
},
message: '',
},
],
}).validate(
{
v: 2,
},
errors => {
expect(errors.length).toBe(6);
expect(errors.length).toBe(7);
expect(errors[0].message).toBe('e1');
expect(errors[1].message).toBe('e2');
expect(errors[2].message).toBe('e3');
expect(errors[3].message).toBe('v3 fails');
expect(errors[4].message).toBe('e5');
expect(errors[5].message).toBe('e6');
expect(errors[6].message).toBe('');
done();
},
);
Expand Down

0 comments on commit a1a6891

Please sign in to comment.