@balena/odata-parser
Advanced tools
Comparing version 4.1.0-build-bind-null-f97032347a3db161dcd50b86987705f18de8623b-1 to 4.1.0
{ | ||
"name": "@balena/odata-parser", | ||
"version": "4.1.0-build-bind-null-f97032347a3db161dcd50b86987705f18de8623b-1", | ||
"version": "4.1.0", | ||
"description": "An OData parser written in OMeta", | ||
@@ -42,4 +42,4 @@ "main": "odata-parser.js", | ||
"versionist": { | ||
"publishedAt": "2025-02-10T14:33:45.217Z" | ||
"publishedAt": "2025-02-10T15:48:46.252Z" | ||
} | ||
} |
@@ -335,2 +335,42 @@ import * as assert from 'assert'; | ||
test( | ||
'$filter=Price in (1, 2, null, 3, null)', | ||
[['List', [['Real', 1], ['Real', 2], ['Null'], ['Real', 3], ['Null']]]], | ||
function (result) { | ||
it('A filter should be present', () => { | ||
assert.notEqual(result.options.$filter, null); | ||
}); | ||
it("Filter should be an instance of 'eqany'", () => { | ||
assert.equal(result.options.$filter[0], 'eqany'); | ||
}); | ||
it('lhr should be Price', () => { | ||
assert.equal(result.options.$filter[1].name, 'Price'); | ||
}); | ||
it('rhr should be [ $1 ]', function () { | ||
assert.equal(result.options.$filter[2].bind, 0); | ||
}); | ||
}, | ||
); | ||
test('$filter=Price in (null)', [['List', [['Null']]]], function (result) { | ||
it('A filter should be present', () => { | ||
assert.notEqual(result.options.$filter, null); | ||
}); | ||
it("Filter should be an instance of 'eqany'", () => { | ||
assert.equal(result.options.$filter[0], 'eqany'); | ||
}); | ||
it('lhr should be Price', () => { | ||
assert.equal(result.options.$filter[1].name, 'Price'); | ||
}); | ||
it('rhr should be [ $1 ]', function () { | ||
assert.equal(result.options.$filter[2].bind, 0); | ||
}); | ||
}); | ||
test('$filter=Price add 5 gt 10', [5, 10], function (result) { | ||
@@ -337,0 +377,0 @@ it('A filter should be present', () => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
254300
6670
1