Skip to content

Commit 664cfe9

Browse files
committed
test: fix skipping tests and add optional chaining for client methods
1 parent 0df4118 commit 664cfe9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('Transactions Spec Prose', function () {
2121
if (this.currentTest) {
2222
this.currentTest.skipReason =
2323
'Transactions on sharded clusters are only supported after 4.2';
24-
this.currentTest.skip();
24+
this.skip();
2525
}
2626
}
2727
started.length = 0;
@@ -39,11 +39,11 @@ describe('Transactions Spec Prose', function () {
3939

4040
afterEach(async function () {
4141
await client
42-
.db()
42+
?.db()
4343
.collection('txn-test')
4444
.drop()
4545
.catch(() => null);
46-
await client.close();
46+
await client?.close();
4747
});
4848

4949
describe('Options Inside Transaction', function () {

0 commit comments

Comments
 (0)