Fixed passing of readonly context in pipe

This commit is contained in:
Mike Farah
2023-04-11 12:04:04 +10:00
parent 9d3c402923
commit 385921a3e2
3 changed files with 17 additions and 2 deletions
+8
View File
@@ -21,6 +21,14 @@ var pipeOperatorScenarios = []expressionScenario{
"D0, P[], (doc)::{a: cat, b: dog, c: same}\n",
},
},
{
skipDoc: true,
description: "Don't pass readonly context",
expression: `(3 + 4) | ({} | .b = "dog")`,
expected: []string{
"D0, P[], (!!map)::b: dog\n",
},
},
}
func TestPipeOperatorScenarios(t *testing.T) {