MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / TestFlatten

Function TestFlatten

internal/editorconfig/editorconfig_test.go:78–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

76}
77
78func TestFlatten(t *testing.T) {
79 data := map[string]any{
80 "top": "value",
81 "nested": map[string]any{
82 "foo": "bar",
83 "list": []any{
84 map[string]any{"k": "v"},
85 "second",
86 },
87 },
88 }
89 got := editorconfig.Flatten(data, "claude")
90 want := map[string]string{
91 "claude.top": "value",
92 "claude.nested.foo": "bar",
93 "claude.nested.list.0.k": "v",
94 "claude.nested.list.1": "second",
95 }
96 if !reflect.DeepEqual(got, want) {
97 t.Fatalf("Flatten = %v, want %v", got, want)
98 }
99}
100
101func TestParseScalar(t *testing.T) {
102 tests := []struct {

Callers

nothing calls this directly

Calls 1

FlattenFunction · 0.92

Tested by

no test coverage detected