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

Function TestJQErrorsWithInvalidInput

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

Source from the content-addressed store, hash-verified

835}
836
837func TestJQErrorsWithInvalidInput(t *testing.T) {
838 t.Parallel()
839 input := "invalid JSON value"
840 _, err := script.Echo(input).JQ(".").String()
841 if err == nil {
842 t.Error("want error from invalid JSON input, got nil")
843 }
844}
845
846func TestJQProducesValidResultsUntilFirstError(t *testing.T) {
847 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…