(t *testing.T)
| 70 | } |
| 71 | |
| 72 | func TestRunChatGraphView(t *testing.T) { |
| 73 | dir := t.TempDir() |
| 74 | out := filepath.Join(dir, "g.html") |
| 75 | cli := &ChatCLI{} |
| 76 | args := `{"output":"` + out + `","open":false,"nodes":[{"id":"a","label":"A"}],"edges":[]}` |
| 77 | res := cli.runChatGraphView(context.Background(), args) |
| 78 | if strings.HasPrefix(res, "graphview error") { |
| 79 | t.Fatalf("unexpected error: %s", res) |
| 80 | } |
| 81 | if _, err := os.Stat(out); err != nil { |
| 82 | t.Fatalf("output not written: %v", err) |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func TestConfigChatGraphViewToggle(t *testing.T) { |
| 87 | t.Setenv(chatGraphViewEnvVar, "true") |
nothing calls this directly
no test coverage detected