fix: Make sure len([BODY]) works if the body is a JSON array
Fixes #359
This commit is contained in:
@ -62,6 +62,14 @@ func TestEval(t *testing.T) {
|
||||
ExpectedOutputLength: 1,
|
||||
ExpectedError: false,
|
||||
},
|
||||
{
|
||||
Name: "array-of-values-with-no-path",
|
||||
Path: "",
|
||||
Data: `[1, 2]`,
|
||||
ExpectedOutput: "[1 2]", // the output is an array
|
||||
ExpectedOutputLength: 2,
|
||||
ExpectedError: false,
|
||||
},
|
||||
{
|
||||
Name: "array-of-values-and-invalid-index",
|
||||
Path: "ids[wat]",
|
||||
|
Reference in New Issue
Block a user