Skip to content

Commit d91a4eb

Browse files
committed
test(MongoMemoryServer): clean tmpdir from "getStartOptions1" tests
1 parent 690aa42 commit d91a4eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/mongodb-memory-server-core/src/__tests__/MongoMemoryServer.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,8 @@ describe('MongoMemoryServer', () => {
945945
expect(options.data.dbPath).toEqual(tmpDbPath.name);
946946
expect(readdirSpy).toHaveBeenCalledTimes(1);
947947
expect(options.createAuth).toEqual(true);
948+
949+
tmpDbPath.removeCallback();
948950
});
949951

950952
it('should resolve "isNew" to "false" and set "createAuth" to "false" when dbPath is set, but not empty', async () => {
@@ -971,6 +973,8 @@ describe('MongoMemoryServer', () => {
971973
expect(options.data.dbPath).toEqual(tmpDbPath.name);
972974
expect(readdirSpy).toHaveBeenCalledTimes(1);
973975
expect(options.createAuth).toEqual(false);
976+
977+
tmpDbPath.removeCallback();
974978
});
975979

976980
it('should generate a port when no suggestion is defined', async () => {

0 commit comments

Comments
 (0)