9
9
PropertyType ,
10
10
getDefaultValues ,
11
11
ObjectIdConstructorParameter ,
12
- GetIdsOptions ,
13
12
} from '../utils' ;
14
13
15
14
describe ( 'utils' , ( ) => {
@@ -385,7 +384,6 @@ describe('utils', () => {
385
384
string ,
386
385
{
387
386
input : readonly ObjectIdConstructorParameter [ ] ;
388
- options ?: GetIdsOptions ;
389
387
expected : readonly ObjectId [ ] ;
390
388
} ,
391
389
]
@@ -440,18 +438,17 @@ describe('utils', () => {
440
438
'invalid values, when filterInvalid is true' ,
441
439
{
442
440
input : [ '123' , '123456789012345678900021' ] ,
443
- options : { filterInvalid : true } ,
444
441
expected : [ new ObjectId ( '123456789012345678900021' ) ] ,
445
442
} ,
446
443
] ,
447
- ] ) ( 'should return ObjectIds from %s' , ( _name , { input, options , expected } ) => {
444
+ ] ) ( 'should return ObjectIds from %s' , ( _name , { input, expected } ) => {
448
445
expect . assertions ( 4 ) ;
449
446
450
447
// Given
451
448
expect ( expected . length ) . toBeLessThanOrEqual ( input . length ) ;
452
449
453
450
// When
454
- const actual = getIds ( input , options ) ;
451
+ const actual = getIds ( input ) ;
455
452
456
453
// Then
457
454
expect ( actual ) . toEqual ( expected ) ;
@@ -464,17 +461,5 @@ describe('utils', () => {
464
461
) ;
465
462
expect ( isEveryHexEquivalent ) . toBeTruthy ( ) ;
466
463
} ) ;
467
-
468
- test ( 'should throw on invalid values, when filterInvalid is unspecified' , ( ) => {
469
- expect . assertions ( 1 ) ;
470
-
471
- // Given
472
- const input = [ '123' , '123456789012345678900021' ] ;
473
-
474
- // When/Then
475
- expect ( ( ) => getIds ( input ) ) . toThrowErrorMatchingInlineSnapshot (
476
- '"input must be a 24 character hex string, 12 byte Uint8Array, or an integer"'
477
- ) ;
478
- } ) ;
479
464
} ) ;
480
465
} ) ;
0 commit comments