We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e930a27 commit 034c169Copy full SHA for 034c169
test/typescript/index.spec.ts
@@ -6,9 +6,17 @@ const Validator: typeof ValidatorType = require('../../index'); // here we impor
6
describe('Typescript Definitions', () => {
7
it('should compile validator', async () => {
8
const v = new Validator();
9
- const compiled = v.compile({});
+ const compiled = v.compile({
10
+ id: { type: "number", min: 1, integer: true }
11
+ });
12
13
expect(compiled).toBeInstanceOf(Function)
14
+
15
+ const res = compiled({
16
+ id: 2
17
18
19
+ expect(res).toBe(true);
20
});
21
22
0 commit comments