Skip to content

Commit fc9f0e3

Browse files
committed
test: update transaction test to assert document existence instead of using a loop
1 parent fd5a174 commit fc9f0e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('Transactions Spec Prose', function () {
6161
});
6262

6363
// keep finding until we get a result, otherwise the test will timeout.
64-
while ((await collection.findOne({ _id })) == null);
64+
expect(await collection.findOne({ _id })).to.have.property('n', 1);
6565

6666
const insertStarted = started.find(ev => ev.commandName === 'insert');
6767
expect(insertStarted).to.not.have.nested.property('command.writeConcern');

0 commit comments

Comments
 (0)