Skip to content

Commit

Permalink
chore: fix JSONArray interface
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Oct 5, 2023
1 parent 65b540c commit f7fabe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions celext/cel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestCelMultipleReturns(t *testing.T) {
}{
// {Input: `base64.Encode("flanksource")`, Outputs: []any{"Zmxhbmtzb3VyY2U=", nil}},
// {Input: `base64.Decode("Zmxhbmtzb3VyY2U=")`, Outputs: []any{"flanksource", nil}},
{Input: `data.JSONArray("[\"name\",\"flanksource\"]")`, Outputs: []any{[]any{"name", "flanksource"}, nil}},
{Input: `JSONArray("[\"name\",\"flanksource\"]")`, Outputs: []any{"name", "flanksource"}},
}

for i, td := range testData {
Expand Down Expand Up @@ -84,7 +84,7 @@ func TestCelSliceReturn(t *testing.T) {
Input string
Output any
}{
{Input: `Split("-", "open-source")`, Output: []string{"open", "source"}},
{Input: `"open-source".split("-")`, Output: []string{"open", "source"}},
}

for i, td := range testData {
Expand Down

0 comments on commit f7fabe0

Please sign in to comment.