Fixing entries test

This commit is contained in:
Mike Farah
2021-06-08 21:50:14 +10:00
parent ed377a032d
commit 01e478e81d
2 changed files with 8 additions and 6 deletions
+4 -4
View File
@@ -53,11 +53,11 @@ var entriesOperatorScenarios = []expressionScenario{
},
},
{
description: "Use with_entries to filter keys",
document: `{a: b: "bird", c: d: "dog"}`,
expression: `with_entries(.value | has("b"))`,
description: "Use with_entries to filter the map",
document: `{a: { b: bird }, c: { d: dog }}`,
expression: `with_entries(select(.value | has("b")))`,
expected: []string{
"D0, P[], (!!map)::a:\n b: \"bird\"\n",
"D0, P[], (!!map)::a: {b: bird}\n",
},
},
}