MCPcopy
hub / github.com/bitfield/script / TestJQErrorsWithInvalidQuery

Function TestJQErrorsWithInvalidQuery

script_test.go:828–835  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

826}
827
828func TestJQErrorsWithInvalidQuery(t *testing.T) {
829 t.Parallel()
830 input := `[1, 2, 3]`
831 _, err := script.Echo(input).JQ(".foo & .bar").String()
832 if err == nil {
833 t.Error("want error from invalid JQ query, got nil")
834 }
835}
836
837func TestJQErrorsWithInvalidInput(t *testing.T) {
838 t.Parallel()

Callers

nothing calls this directly

Calls 4

EchoFunction · 0.92
StringMethod · 0.80
JQMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…