@@ -2,7 +2,7 @@ import { expect } from 'chai';
2
2
import type { Db , Document , MongoClientOptions } from 'mongodb' ;
3
3
import { MongoClient } from 'mongodb' ;
4
4
import { eventually } from '../../../testing/eventually' ;
5
- import { TestShell } from './test-shell' ;
5
+ import { cleanTestShellsAfterEach , TestShell } from './test-shell' ;
6
6
import {
7
7
skipIfApiStrict ,
8
8
startSharedTestServer ,
@@ -107,6 +107,8 @@ describe('Auth e2e', function () {
107
107
let examplePrivilege2 : Document ;
108
108
109
109
describe ( 'with regular URI' , function ( ) {
110
+ cleanTestShellsAfterEach ( ) ;
111
+
110
112
beforeEach ( async function ( ) {
111
113
const connectionString = await testServer . connectionString ( ) ;
112
114
dbName = `test-${ Date . now ( ) } ` ;
@@ -137,7 +139,6 @@ describe('Auth e2e', function () {
137
139
138
140
await client . close ( ) ;
139
141
} ) ;
140
- afterEach ( TestShell . cleanup ) ;
141
142
142
143
describe ( 'user management' , function ( ) {
143
144
describe ( 'createUser' , function ( ) {
@@ -1144,6 +1145,7 @@ describe('Auth e2e', function () {
1144
1145
1145
1146
await client . close ( ) ;
1146
1147
} ) ;
1147
- afterEach ( TestShell . cleanup ) ;
1148
+
1149
+ cleanTestShellsAfterEach ( ) ;
1148
1150
} ) ;
1149
1151
} ) ;
0 commit comments