@@ -2,7 +2,14 @@ import { describe, expect, test } from '@jest/globals';
22import { ObjectId } from 'mongodb' ;
33import { expectType } from 'ts-expect' ;
44import { DefaultsOption } from '../schema' ;
5- import { NestedPaths , ProjectionType , getIds , PropertyType , getDefaultValues } from '../utils' ;
5+ import {
6+ NestedPaths ,
7+ ProjectionType ,
8+ getIds ,
9+ PropertyType ,
10+ getDefaultValues ,
11+ ObjectIdConstructorParameter ,
12+ } from '../utils' ;
613
714describe ( 'utils' , ( ) => {
815 interface TestDocument {
@@ -372,7 +379,8 @@ describe('utils', () => {
372379 } ) ;
373380
374381 describe ( 'getIds' , ( ) => {
375- test . each < [ string , readonly ( ObjectId | string ) [ ] , readonly ObjectId [ ] ] > ( [
382+ // prettier-ignore
383+ test . each < [ string , readonly ObjectIdConstructorParameter [ ] , readonly ObjectId [ ] ] > ( [
376384 [
377385 'strings' ,
378386 [ '123456789012345678900001' , '123456789012345678900002' ] ,
@@ -383,6 +391,14 @@ describe('utils', () => {
383391 [ new ObjectId ( '123456789012345678900099' ) , new ObjectId ( '123456789012345678900022' ) ] ,
384392 [ new ObjectId ( '123456789012345678900099' ) , new ObjectId ( '123456789012345678900022' ) ] ,
385393 ] ,
394+ [
395+ 'Uint8Array' ,
396+ [
397+ new Uint8Array ( [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ] ) ,
398+ new Uint8Array ( [ 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 ] )
399+ ] ,
400+ [ new ObjectId ( '0102030405060708090a0b0c' ) , new ObjectId ( '0d0e0f101112131415161718' ) ] ,
401+ ] ,
386402 [
387403 'mixed' ,
388404 [ '123456789012345678900014' , new ObjectId ( '123456789012345678900088' ) ] ,
0 commit comments