Skip to content

Commit

Permalink
chore: add missing insta snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
V0ldek committed Dec 30, 2024
1 parent 17f0360 commit c9292d1
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
source: crates/rsonpath-syntax/tests/query_serialization_snapshots.rs
expression: "&parse(\"$..user[[email protected] == 'value']..entities..url\")?"
snapshot_kind: text
---
JsonPathQuery(
segments: [
Descendant(Selectors(
inner: [
Name(JsonString(
quoted: "\"user\"",
)),
],
)),
Child(Selectors(
inner: [
Filter(Comparison(ComparisonExpr(
lhs: RelativeSingularQuery(SingularJsonPathQuery(
segments: [
Name(JsonString(
quoted: "\"id\"",
)),
],
)),
op: EqualTo,
rhs: Literal(String(JsonString(
quoted: "\"value\"",
))),
))),
],
)),
Descendant(Selectors(
inner: [
Name(JsonString(
quoted: "\"entities\"",
)),
],
)),
Descendant(Selectors(
inner: [
Name(JsonString(
quoted: "\"url\"",
)),
],
)),
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
source: crates/rsonpath-syntax/tests/query_serialization_snapshots.rs
expression: "&parse(\"$..entries['abc', 4, 7:10:13]\")?"
snapshot_kind: text
---
JsonPathQuery(
segments: [
Descendant(Selectors(
inner: [
Name(JsonString(
quoted: "\"entries\"",
)),
],
)),
Child(Selectors(
inner: [
Name(JsonString(
quoted: "\"abc\"",
)),
Index(FromStart(JsonUInt(4))),
Slice(Slice(
start: FromStart(JsonUInt(7)),
end: Some(FromStart(JsonUInt(10))),
step: Forward(JsonUInt(13)),
)),
],
)),
],
)
Original file line number Diff line number Diff line change
@@ -1,45 +1,23 @@
---
source: crates/rsonpath-syntax/tests/query_serialization_snapshots.rs
expression: "&parse(\"$..user[[email protected] == 'value']..entities..url\")?"
expression: "&parse(\"$..entries[3:5:7]\")?"
snapshot_kind: text
---
JsonPathQuery(
segments: [
Descendant(Selectors(
inner: [
Name(JsonString(
quoted: "\"user\"",
quoted: "\"entries\"",
)),
],
)),
Child(Selectors(
inner: [
Filter(Comparison(ComparisonExpr(
lhs: RelativeSingularQuery(SingularJsonPathQuery(
segments: [
Name(JsonString(
quoted: "\"id\"",
)),
],
)),
op: EqualTo,
rhs: Literal(String(JsonString(
quoted: "\"value\"",
))),
))),
],
)),
Descendant(Selectors(
inner: [
Name(JsonString(
quoted: "\"entities\"",
)),
],
)),
Descendant(Selectors(
inner: [
Name(JsonString(
quoted: "\"url\"",
Slice(Slice(
start: FromStart(JsonUInt(3)),
end: Some(FromStart(JsonUInt(5))),
step: Forward(JsonUInt(7)),
)),
],
)),
Expand Down

0 comments on commit c9292d1

Please sign in to comment.