mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-06-18 02:21:30 +00:00
Results do not match other implementations - js unit test
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "jsonpath_lib"
|
||||
version = "0.2.0"
|
||||
version = "0.2.2"
|
||||
authors = ["Changseok Han <freestrings@gmail.com>"]
|
||||
|
||||
description = "It is JsonPath engine written in Rust. it provide a similar API interface in Webassembly and Javascript also. - Webassembly Demo: https://freestrings.github.io/jsonpath"
|
||||
|
@ -14,7 +14,7 @@ exclude = ["artifacts.json", "index.node"]
|
||||
neon-build = "0.2.0"
|
||||
|
||||
[dependencies]
|
||||
jsonpath_lib = "0.2.0"
|
||||
jsonpath_lib = "0.2.2"
|
||||
#jsonpath_lib = { path = "../../" }
|
||||
neon = "0.2.0"
|
||||
neon-serde = "0.1.1"
|
||||
|
@ -798,3 +798,12 @@ describe('README test', () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('ISSUE test', () => {
|
||||
it('Results do not match other implementations #6', (done) => {
|
||||
let result = jsonpath.select(["first", "second"], "$[:]");
|
||||
if (JSON.stringify(result) === JSON.stringify(["first", "second"])) {
|
||||
done();
|
||||
}
|
||||
});
|
||||
});
|
@ -377,7 +377,7 @@ impl Parser {
|
||||
debug!("#range_to");
|
||||
match tokenizer.peek_token() {
|
||||
Ok(Token::CloseArray(_)) => {
|
||||
return Ok(Self::node(ParseToken::Range(None, None)))
|
||||
return Ok(Self::node(ParseToken::Range(None, None)));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "jsonpath-wasm"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
authors = ["Changseok Han <freestrings@gmail.com>"]
|
||||
description = "It is Webassembly version of jsonpath_lib that is JsonPath engine written in Rust - Demo: https://freestrings.github.io/jsonpath"
|
||||
keywords = ["jsonpath", "json", "webassembly", "parsing", "rust"]
|
||||
|
@ -822,3 +822,12 @@ describe('README test', () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('ISSUE test', () => {
|
||||
it('Results do not match other implementations #6', (done) => {
|
||||
let result = jsonpath.select(["first", "second"], "$[:]");
|
||||
if (JSON.stringify(result) === JSON.stringify(["first", "second"])) {
|
||||
done();
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user