MCPcopy
hub / github.com/larksuite/cli / TestParseJSONMap_WithStdin

Function TestParseJSONMap_WithStdin

internal/cmdutil/resolve_test.go:208–217  ·  view source on GitHub ↗

Integration: ResolveInput flows through ParseJSONMap correctly.

(t *testing.T)

Source from the content-addressed store, hash-verified

206
207// Integration: ResolveInput flows through ParseJSONMap correctly.
208func TestParseJSONMap_WithStdin(t *testing.T) {
209 stdin := strings.NewReader(`{"message_id":"om_xxx","user_id_type":"open_id"}`)
210 got, err := ParseJSONMap("-", "--params", stdin, nil)
211 if err != nil {
212 t.Fatalf("unexpected error: %v", err)
213 }
214 if len(got) != 2 {
215 t.Errorf("got %d keys, want 2", len(got))
216 }
217}
218
219// Integration: @file flows through ParseJSONMap correctly.
220func TestParseJSONMap_WithAtFile(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ParseJSONMapFunction · 0.85

Tested by

no test coverage detected