Skip to content

Commit 82ebc5b

Browse files
committed
- Testing: Improve coverage (check slice)
1 parent 2a57053 commit 82ebc5b

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/test.slice.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
describe('JSONPath - slice', function () {
2+
const json = {
3+
"name": "root",
4+
"children": {}
5+
};
6+
it('should return empty array if slicing non-array', function () {
7+
const expected = undefined;
8+
const result = jsonpath({json, path: '$.children[1:3]', wrap: false});
9+
assert.deepEqual(result, expected);
10+
});
11+
});

0 commit comments

Comments
 (0)