Skip to content

Commit 5782409

Browse files
authored
Merge pull request Automattic#15106 from Automattic/vkarpov15/Automatticgh-15094
test(transactions): add test case for Automattic#15094
2 parents b9136c1 + 2b37dd6 commit 5782409

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/docs/transactions.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ describe('transactions', function() {
399399
let docs = await Test.aggregate([{ $match: { _id: doc._id } }]);
400400
assert.equal(docs.length, 1);
401401

402+
const aggCursor = Test.aggregate([{ $match: { _id: doc._id } }]).cursor();
403+
docs = [await aggCursor.next()];
404+
assert.equal(docs[0].name, 'test_transactionAsyncLocalStorage');
405+
402406
docs = await Test.find({ _id: doc._id });
403407
assert.equal(docs.length, 1);
404408

0 commit comments

Comments
 (0)