Skip to content

Commit 8d22459

Browse files
committed
Fix issue with boolean sanitize unit test
Signed-off-by: Andrei Kazakou <a.v.kazakou@gmail.com>
1 parent 3b5d4ca commit 8d22459

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/typescript/rules/boolean.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// <reference path="../../../index.d.ts" /> // here we make a reference to exists module definition
2-
import ValidatorType, { ValidationSchema } from 'fastest-validator'; // here we importing type definition of default export
2+
import ValidatorType from 'fastest-validator'; // here we importing type definition of default export
33

44
const Validator: typeof ValidatorType = require('../../../index'); // here we importing real Validator Constructor
55
const v: ValidatorType = new Validator();
@@ -44,7 +44,7 @@ describe('TypeScript Definitions', () => {
4444
it('should sanitize', () => {
4545
const check = v.compile({ status: { type: 'boolean', convert: true } });
4646

47-
let obj: ValidationSchema = { status: 0 };
47+
let obj: { status: number | boolean | 'true' | 'false' | 'on' | 'off' } = { status: 0 };
4848
expect(check(obj)).toEqual(true);
4949
expect(obj).toEqual({ status: false });
5050

0 commit comments

Comments
 (0)