Skip to content

Commit e864fd2

Browse files
committed
added testcase for array type
1 parent d35ce85 commit e864fd2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

spec/QueryTools.spec.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,21 @@ describe('matchesQuery', function () {
305305
expect(matchesQuery(obj1, q)).toBe(true);
306306
});
307307

308+
it('matches on queries with new format #parse-SDK-JS/pull/1373 for Array', function () {
309+
const obj = {
310+
objectId: 'Person01',
311+
name: 'Bill',
312+
nums: [1, 2, 3, 4],
313+
};
314+
315+
const q = {
316+
nums: {
317+
$eq: 5,
318+
},
319+
};
320+
expect(matchesQuery(obj, q)).toBe(false);
321+
});
322+
308323
it('matches on inequalities', function () {
309324
const player = {
310325
id: new Id('Person', 'O1'),

0 commit comments

Comments
 (0)