MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / TestFormatJqResults

Function TestFormatJqResults

checks/jq_test.go:100–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestFormatJqResults(t *testing.T) {
101 got := formatJqResults([]any{"hello", float64(42), true, nil, map[string]any{"id": float64(1)}})
102 want := []string{`"hello"`, `42`, `true`, `null`, `{"id":1}`}
103 if !reflect.DeepEqual(got, want) {
104 t.Fatalf("formatJqResults() = %#v, want %#v", got, want)
105 }
106}
107
108func TestFormatJqExpectedValueInterpolatesOnlyStrings(t *testing.T) {
109 variables := map[string]string{"name": "Theo"}

Callers

nothing calls this directly

Calls 1

formatJqResultsFunction · 0.85

Tested by

no test coverage detected