File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed
tests/validation/drivers/validators Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change 1
1
import { expect } from "chai"
2
2
import { combineValidators } from "../../../../src/validation/drivers/helpers/combineValidators"
3
+ import { either } from "../../../../src/validation/drivers/helpers/either"
3
4
import {
4
- ValidationError ,
5
- isISOAlpha2CountryCode ,
6
- isObject ,
7
- isString , isUndefined
8
- } from "../../../../src" ;
9
- import { either } from "../../../../src/validation/drivers/helpers/either" ;
5
+ ValidationError ,
6
+ isISOAlpha2CountryCode ,
7
+ isObject ,
8
+ isString ,
9
+ isUndefined ,
10
+ } from "../../../../src"
10
11
11
12
describe ( "isNull" , ( ) => {
12
13
const objectFilter = isObject ( {
@@ -58,14 +59,14 @@ describe("isNull", () => {
58
59
} )
59
60
60
61
it ( "should return a required validation error if a key is absent" , async ( ) => {
61
- try {
62
- await objectFilter ( {
63
- test : "Test Value"
64
- } )
65
- expect ( false ) . to . equal ( true )
66
- } catch ( e ) {
67
- expect ( e ) . to . be . instanceOf ( ValidationError )
68
- expect ( e . constraintName ) . to . equal ( "IS_STRING" )
69
- }
62
+ try {
63
+ await objectFilter ( {
64
+ test : "Test Value" ,
65
+ } )
66
+ expect ( false ) . to . equal ( true )
67
+ } catch ( e ) {
68
+ expect ( e ) . to . be . instanceOf ( ValidationError )
69
+ expect ( e . constraintName ) . to . equal ( "IS_STRING" )
70
+ }
70
71
} )
71
72
} )
You can’t perform that action at this time.
0 commit comments