99 PropertyType ,
1010 getDefaultValues ,
1111 ObjectIdConstructorParameter ,
12- GetIdsOptions ,
1312} from '../utils' ;
1413
1514describe ( 'utils' , ( ) => {
@@ -385,7 +384,6 @@ describe('utils', () => {
385384 string ,
386385 {
387386 input : readonly ObjectIdConstructorParameter [ ] ;
388- options ?: GetIdsOptions ;
389387 expected : readonly ObjectId [ ] ;
390388 } ,
391389 ]
@@ -440,18 +438,17 @@ describe('utils', () => {
440438 'invalid values, when filterInvalid is true' ,
441439 {
442440 input : [ '123' , '123456789012345678900021' ] ,
443- options : { filterInvalid : true } ,
444441 expected : [ new ObjectId ( '123456789012345678900021' ) ] ,
445442 } ,
446443 ] ,
447- ] ) ( 'should return ObjectIds from %s' , ( _name , { input, options , expected } ) => {
444+ ] ) ( 'should return ObjectIds from %s' , ( _name , { input, expected } ) => {
448445 expect . assertions ( 4 ) ;
449446
450447 // Given
451448 expect ( expected . length ) . toBeLessThanOrEqual ( input . length ) ;
452449
453450 // When
454- const actual = getIds ( input , options ) ;
451+ const actual = getIds ( input ) ;
455452
456453 // Then
457454 expect ( actual ) . toEqual ( expected ) ;
@@ -464,17 +461,5 @@ describe('utils', () => {
464461 ) ;
465462 expect ( isEveryHexEquivalent ) . toBeTruthy ( ) ;
466463 } ) ;
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- } ) ;
479464 } ) ;
480465} ) ;
0 commit comments