test(cmd/bd): pin mixed-case dep tree --format Mermaid through the CLI

TestDepTreeFormatMermaidCaseInsensitive calls isMermaidTreeFormat directly,
so reverting the runDepTree dispatch to formatStr == "mermaid" (the PR #6646
bug) kept every test green. Add a --format Mermaid call to the embedded
tree_format_mermaid subtest so the flag-to-renderer wiring is pinned.

AC: AC-1
AC: AC-2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian Knutsen 2026-10-19 06:46:52 +00:00
commit c325246d4a

View file

@ -390,6 +390,14 @@ func TestEmbeddedDepBTreeAndCycles(t *testing.T) {
if !strings.Contains(out, "flowchart") && !strings.Contains(out, "graph") {
t.Errorf("expected mermaid flowchart/graph syntax: %s", out)
}
// Mixed-case pins case-folding at the runDepTree dispatch site.
// TestDepTreeFormatMermaidCaseInsensitive calls isMermaidTreeFormat
// directly and would stay green if the call site went back to
// formatStr == "mermaid" (the PR #6646 bug).
mixed := bdDep(t, bd, dir, "tree", epic.ID, "--format", "Mermaid")
if !strings.Contains(mixed, "flowchart") && !strings.Contains(mixed, "graph") {
t.Errorf("expected mermaid flowchart/graph syntax for --format Mermaid: %s", mixed)
}
})
t.Run("tree_json_output", func(t *testing.T) {