@@ -2,7 +2,7 @@ import { expect } from 'chai';
22import type { Db , Document , MongoClientOptions } from 'mongodb' ;
33import { MongoClient } from 'mongodb' ;
44import { eventually } from '../../../testing/eventually' ;
5- import { TestShell } from './test-shell' ;
5+ import { cleanTestShellsAfterEach , TestShell } from './test-shell' ;
66import {
77 skipIfApiStrict ,
88 startSharedTestServer ,
@@ -107,6 +107,8 @@ describe('Auth e2e', function () {
107107 let examplePrivilege2 : Document ;
108108
109109 describe ( 'with regular URI' , function ( ) {
110+ cleanTestShellsAfterEach ( ) ;
111+
110112 beforeEach ( async function ( ) {
111113 const connectionString = await testServer . connectionString ( ) ;
112114 dbName = `test-${ Date . now ( ) } ` ;
@@ -137,7 +139,6 @@ describe('Auth e2e', function () {
137139
138140 await client . close ( ) ;
139141 } ) ;
140- afterEach ( TestShell . cleanup ) ;
141142
142143 describe ( 'user management' , function ( ) {
143144 describe ( 'createUser' , function ( ) {
@@ -1144,6 +1145,7 @@ describe('Auth e2e', function () {
11441145
11451146 await client . close ( ) ;
11461147 } ) ;
1147- afterEach ( TestShell . cleanup ) ;
1148+
1149+ cleanTestShellsAfterEach ( ) ;
11481150 } ) ;
11491151} ) ;
0 commit comments