@@ -18,15 +18,11 @@ t.test('truthy non-objects always loose mode, for backwards comp', t => {
18
18
t . end ( )
19
19
} )
20
20
21
- t . test ( 'objects only include truthy flags we know about, set to true' , t => {
22
- t . strictSame ( parseOptions ( / a s d f / ) , { } )
23
- t . strictSame ( parseOptions ( new Error ( 'hello' ) ) , { } )
24
- t . strictSame ( parseOptions ( { loose : true , a : 1 , rtl : false } ) , { loose : true } )
25
- t . strictSame ( parseOptions ( { loose : 1 , rtl : 2 , includePrerelease : 10 } ) , {
26
- loose : true ,
27
- rtl : true ,
28
- includePrerelease : true ,
29
- } )
21
+ t . test ( 'any object passed is returned' , t => {
22
+ t . strictSame ( parseOptions ( / a s d f / ) , / a s d f / )
23
+ t . strictSame ( parseOptions ( new Error ( 'hello' ) ) , new Error ( 'hello' ) )
24
+ t . strictSame ( parseOptions ( { loose : true , a : 1 , rtl : false } ) , { loose : true , a : 1 , rtl : false } )
25
+ t . strictSame ( parseOptions ( { loose : 1 , rtl : 2 , includePrerelease : 10 } ) , { loose : 1 , rtl : 2 , includePrerelease : 10 } )
30
26
t . strictSame ( parseOptions ( { loose : true } ) , { loose : true } )
31
27
t . strictSame ( parseOptions ( { rtl : true } ) , { rtl : true } )
32
28
t . strictSame ( parseOptions ( { includePrerelease : true } ) , { includePrerelease : true } )
@@ -35,12 +31,3 @@ t.test('objects only include truthy flags we know about, set to true', t => {
35
31
t . strictSame ( parseOptions ( { rtl : true , includePrerelease : true } ) , { rtl : true , includePrerelease : true } )
36
32
t . end ( )
37
33
} )
38
-
39
- t . test ( 'should skip validation when options is already parsed' , t => {
40
- const options = { loose : true , rtl : true }
41
- const parsedOptions = parseOptions ( options )
42
-
43
- t . equal ( parseOptions ( parsedOptions ) === parsedOptions , true )
44
- t . not ( parseOptions ( options ) === parsedOptions , false )
45
- t . end ( )
46
- } )
0 commit comments