Skip to content

Commit

Permalink
refactor(MongoMemoryServer::stop): remove assertion for typescript types
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Nov 25, 2021
1 parent 69b1a03 commit df5b888
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/mongodb-memory-server-core/src/MongoMemoryServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,6 @@ export class MongoMemoryServer extends EventEmitter implements ManagerAdvanced {
return false;
}

// assert here, otherwise typescript is not happy
// TODO: remove check, typescript does not need this anymore
assertion(
!isNullOrUndefined(this._instanceInfo.instance),
new Error('"instanceInfo.instance" is undefined!')
);

this.debug(
`stop: Stopping MongoDB server on port ${this._instanceInfo.port} with pid ${this._instanceInfo.instance.mongodProcess?.pid}` // "undefined" would say more than ""
);
Expand Down

0 comments on commit df5b888

Please sign in to comment.