Add TestEvalWithInvalidData

This commit is contained in:
TwinProduction 2021-05-15 22:26:51 -04:00
parent 8106832d69
commit e3038f0e80

View File

@ -20,6 +20,15 @@ func TestEval(t *testing.T) {
} }
} }
func TestEvalWithInvalidData(t *testing.T) {
path := "simple"
data := `invalid data`
_, _, err := Eval(path, []byte(data))
if err == nil {
t.Error("expected an error")
}
}
func TestEvalWithInvalidPath(t *testing.T) { func TestEvalWithInvalidPath(t *testing.T) {
path := "errors" path := "errors"
data := `{}` data := `{}`