@@ -5,7 +5,7 @@ import * as path from 'node:path';
55import  {  expect  }  from  'chai' ; 
66
77import  {  dependencies ,  peerDependencies ,  peerDependenciesMeta  }  from  '../../package.json' ; 
8- import  {  setDifference  }  from  '../mongodb ' ; 
8+ import  {  setDifference  }  from  '../../src/utils ' ; 
99import  {  alphabetically ,  itInNodeProcess ,  sorted  }  from  '../tools/utils' ; 
1010
1111const  EXPECTED_DEPENDENCIES  =  sorted ( 
@@ -82,16 +82,15 @@ describe('package.json', function () {
8282        } ) ; 
8383
8484        if  ( depName  ===  'snappy' )  { 
85-           itInNodeProcess ( 
86-             'getSnappy returns rejected import' , 
87-             async  function  ( {  expect,  mongodb } )  { 
88-               const  snappyImport  =  mongodb . getSnappy ( ) ; 
89-               expect ( snappyImport ) . to . have . nested . property ( 
90-                 'kModuleError.name' , 
91-                 'MongoMissingDependencyError' 
92-               ) ; 
93-             } 
94-           ) ; 
85+           itInNodeProcess ( 'getSnappy returns rejected import' ,  async  function  ( {  expect } )  { 
86+             // @ts -expect-error: import from the inside forked process 
87+             const  {  getSnappy }  =  await  import ( './src/deps.ts' ) ; 
88+             const  snappyImport  =  getSnappy ( ) ; 
89+             expect ( snappyImport ) . to . have . nested . property ( 
90+               'kModuleError.name' , 
91+               'MongoMissingDependencyError' 
92+             ) ; 
93+           } ) ; 
9594        } 
9695      } ) ; 
9796
@@ -111,14 +110,13 @@ describe('package.json', function () {
111110        } ) ; 
112111
113112        if  ( depName  ===  'snappy' )  { 
114-           itInNodeProcess ( 
115-             'getSnappy returns fulfilled import' , 
116-             async  function  ( {  expect,  mongodb } )  { 
117-               const  snappyImport  =  mongodb . getSnappy ( ) ; 
118-               expect ( snappyImport ) . to . have . property ( 'compress' ) . that . is . a ( 'function' ) ; 
119-               expect ( snappyImport ) . to . have . property ( 'uncompress' ) . that . is . a ( 'function' ) ; 
120-             } 
121-           ) ; 
113+           itInNodeProcess ( 'getSnappy returns fulfilled import' ,  async  function  ( {  expect } )  { 
114+             // @ts -expect-error: import from the inside forked process 
115+             const  {  getSnappy }  =  await  import ( './src/deps.ts' ) ; 
116+             const  snappyImport  =  getSnappy ( ) ; 
117+             expect ( snappyImport ) . to . have . property ( 'compress' ) . that . is . a ( 'function' ) ; 
118+             expect ( snappyImport ) . to . have . property ( 'uncompress' ) . that . is . a ( 'function' ) ; 
119+           } ) ; 
122120        } 
123121      } ) ; 
124122    } 
0 commit comments