Skip to content

Commit 6a52f66

Browse files
committed
wip
1 parent 89669ad commit 6a52f66

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/integration/client-side-encryption/client_side_encryption.prose.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,21 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
729729
});
730730
});
731731

732+
it('should maintain an ordered sort', async function () {
733+
const coll = this.encryptedColl;
734+
const events = [];
735+
this.clientEncrypted.on('commandStarted', ev => events.push(ev));
736+
const sort = new Map([
737+
['1', 1],
738+
['0', 1]
739+
]);
740+
await coll.findOne({}, { sort });
741+
expect(events).to.have.lengthOf(2);
742+
expect(events[0]).to.have.property('commandName', 'listCollections');
743+
expect(events[1]).to.have.property('commandName', 'find');
744+
expect(events[1].command.sort).to.deep.equal(sort);
745+
});
746+
732747
function pruneEvents(events) {
733748
return events.map(event => {
734749
// We are pruning out the bunch of repeating As, mostly

0 commit comments

Comments
 (0)