Skip to content

Commit

Permalink
ADD test for #4552
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey committed Mar 15, 2023
1 parent a813ba5 commit aa2aa79
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/unit/rx-query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1329,5 +1329,21 @@ describe('rx-query.test.ts', () => {

c.database.destroy();
});
it('#4552 $elemMatch query not working when there are many documents in the collection', async () => {
const c = await humansCollection.createNested(100);
const result = await c.find({
selector: {
mainSkill: {
$elemMatch: {
name: {
$eq: 'foobar'
}
}
}
}
}).exec();
assert.strictEqual(result.length, 0);
c.database.remove();
});
});
});

0 comments on commit aa2aa79

Please sign in to comment.