Skip to content

Commit

Permalink
fix lint and add extra test showing session propagates down to async …
Browse files Browse the repository at this point in the history
…functions
  • Loading branch information
vkarpov15 committed May 11, 2024
1 parent 819fde3 commit 2df8f37
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/docs/transactions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,12 @@ describe('transactions', function() {
let docs = await Test.aggregate([{ $match: { _id: doc._id } }]);
assert.equal(docs.length, 1);

const docs = await Test.find({ _id: doc._id });
docs = await Test.find({ _id: doc._id });
assert.equal(docs.length, 1);

docs = await Promise.all([async() => {
return await Test.findOne({ _id: doc._id });
}]).then(res => res[0]);
assert.equal(docs.length, 1);

throw new Error('Oops!');
Expand Down

0 comments on commit 2df8f37

Please sign in to comment.