MCPcopy Index your code
hub / github.com/codehamr/codehamr / TestActiveProfileResolvesByName

Function TestActiveProfileResolvesByName

internal/config/config_test.go:465–476  ·  view source on GitHub ↗

TestActiveProfileResolvesByName: the helper returns the right struct.

(t *testing.T)

Source from the content-addressed store, hash-verified

463
464// TestActiveProfileResolvesByName: the helper returns the right struct.
465func TestActiveProfileResolvesByName(t *testing.T) {
466 cfg := &Config{
467 Active: "b",
468 Models: map[string]*Profile{
469 "a": {LLM: "m-a"},
470 "b": {LLM: "m-b"},
471 },
472 }
473 if cfg.ActiveProfile().LLM != "m-b" {
474 t.Fatalf("ActiveProfile().LLM = %q, want m-b", cfg.ActiveProfile().LLM)
475 }
476}
477
478// TestBootstrapCoercesUnknownActive: an unknown `active:` is coerced to the
479// first profile in sorted order so ActiveProfile never returns nil.

Callers

nothing calls this directly

Calls 1

ActiveProfileMethod · 0.95

Tested by

no test coverage detected