array keys - js unit test

This commit is contained in:
freestrings
2019-06-18 13:13:51 +09:00
parent a72a13117e
commit 5d36a0cf15
2 changed files with 20 additions and 0 deletions

View File

@ -475,6 +475,16 @@ describe('filter test', () => {
done();
}
});
it('array keys', (done) => {
let result = jsonpath.select({
"key1": "value1",
"key2": 2
}, "$['key1', 'key2']");
if (JSON.stringify(result) === JSON.stringify(["value1", 2])) {
done();
}
});
});
describe('SelectorMut test', () => {