diff --git a/expressions/expressions_test.go b/expressions/expressions_test.go index 033ee49..f381c52 100644 --- a/expressions/expressions_test.go +++ b/expressions/expressions_test.go @@ -1,6 +1,7 @@ package expressions import ( + "errors" "fmt" "strings" "testing" @@ -134,6 +135,10 @@ func TestEvaluateString(t *testing.T) { _, err = EvaluateString("1 | undefined_filter", ctx) require.Error(t, err) + + cfg.AddFilter("error", func(input interface{}) (string, error) { return "", errors.New("test error") }) + _, err = EvaluateString("1 | error", ctx) + require.Error(t, err) } func TestClosure(t *testing.T) {