Skip to content

Commit 9db4b25

Browse files
author
Jason Posthuma
committed
Added test case
1 parent 25c8461 commit 9db4b25

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/QueryTools.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,16 @@ describe('matchesQuery', function () {
313313
expect(matchesQuery(player, orQuery)).toBe(true);
314314
});
315315

316+
it('does not match $all query when value is missing', () => {
317+
const player = {
318+
id: new Id('Player', 'P1'),
319+
name: 'Player 1',
320+
score: 12,
321+
};
322+
const q = { missing: { $all: [1, 2, 3] } };
323+
expect(matchesQuery(player, q)).toBe(false);
324+
});
325+
316326
it('matches an $and query', () => {
317327
const player = {
318328
id: new Id('Player', 'P1'),

0 commit comments

Comments
 (0)