File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/mongodb-memory-server-core/src/util Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,12 @@ export class MongoInstance extends EventEmitter implements ManagerBase {
286286 }
287287 this . debug ( 'start: Starting Processes' ) ;
288288 this . mongodProcess = this . _launchMongod ( mongoBin ) ;
289+ // This assertion is here because somewhere between nodejs 12 and 16 the types for "childprocess.pid" changed to include "| undefined"
290+ // it is tested and a error is thrown in "this_launchMongod", but typescript somehow does not see this yet as of 4.3.5
291+ assertion (
292+ ! isNullOrUndefined ( this . mongodProcess . pid ) ,
293+ new Error ( 'MongoD Process failed to spawn' )
294+ ) ;
289295 this . killerProcess = this . _launchKiller ( process . pid , this . mongodProcess . pid ) ;
290296
291297 await launch ;
You can’t perform that action at this time.
0 commit comments