Skip to content

Commit 35dc341

Browse files
committed
test: reset transaction test collection before each test
1 parent 09ba999 commit 35dc341

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/integration/transactions/transactions.prose.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,23 @@ describe('Transactions Spec Prose', function () {
1515
beforeEach(async function () {
1616
started.length = 0;
1717
client = this.configuration.newClient({}, { monitorCommands: true });
18+
19+
await client
20+
.db()
21+
.collection('txn-test')
22+
.drop()
23+
.catch(() => null);
24+
await client.db().createCollection('txn-test');
25+
1826
client.on('commandStarted', ev => started.push(ev));
1927
});
2028

2129
afterEach(async function () {
30+
await client
31+
.db()
32+
.collection('txn-test')
33+
.drop()
34+
.catch(() => null);
2235
await client.close();
2336
});
2437

0 commit comments

Comments
 (0)