formatting

This commit is contained in:
Mike Farah 2023-03-15 13:15:17 +11:00
parent 5a62b07d72
commit 8974bc7e96
2 changed files with 7 additions and 8 deletions

View File

@ -30,4 +30,3 @@ func filterOperator(d *dataTreeNavigator, context Context, expressionNode *Expre
} }
return context.ChildContext(results), nil return context.ChildContext(results), nil
} }

View File

@ -7,22 +7,22 @@ import (
var filterOperatorScenarios = []expressionScenario{ var filterOperatorScenarios = []expressionScenario{
{ {
description: "Filter array", description: "Filter array",
document: `[1,2,3]`, document: `[1,2,3]`,
expression: `filter(. < 3)`, expression: `filter(. < 3)`,
expected: []string{ expected: []string{
"D0, P[], (!!seq)::[1, 2]\n", "D0, P[], (!!seq)::[1, 2]\n",
}, },
}, },
{ {
skipDoc: true, skipDoc: true,
document: `[1,2,3]`, document: `[1,2,3]`,
expression: `filter(. > 1)`, expression: `filter(. > 1)`,
expected: []string{ expected: []string{
"D0, P[], (!!seq)::[2, 3]\n", "D0, P[], (!!seq)::[2, 3]\n",
}, },
}, },
{ {
skipDoc: true, skipDoc: true,
description: "Filter array to empty", description: "Filter array to empty",
document: `[1,2,3]`, document: `[1,2,3]`,
expression: `filter(. > 4)`, expression: `filter(. > 4)`,
@ -31,7 +31,7 @@ var filterOperatorScenarios = []expressionScenario{
}, },
}, },
{ {
skipDoc: true, skipDoc: true,
description: "Filter empty array", description: "Filter empty array",
document: `[]`, document: `[]`,
expression: `filter(. > 1)`, expression: `filter(. > 1)`,