MCPcopy Create free account
hub / github.com/driangle/taskmd / TestLoadPhaseOrder_MixedIDAndNoID

Function TestLoadPhaseOrder_MixedIDAndNoID

apps/cli/internal/cli/next_test.go:2030–2045  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2028}
2029
2030func TestLoadPhaseOrder_MixedIDAndNoID(t *testing.T) {
2031 viper.Set("phases", []any{
2032 map[string]any{"id": "core-cli", "name": "Core CLI"},
2033 map[string]any{"name": "Legacy Phase"},
2034 })
2035 defer viper.Set("phases", nil)
2036
2037 got := loadPhaseOrder()
2038 want := []string{"core-cli"}
2039 if len(got) != len(want) {
2040 t.Fatalf("loadPhaseOrder() = %v, want %v", got, want)
2041 }
2042 if got[0] != want[0] {
2043 t.Errorf("loadPhaseOrder()[0] = %q, want %q", got[0], want[0])
2044 }
2045}
2046
2047func TestLoadPhaseOrder_NilPhases(t *testing.T) {
2048 viper.Set("phases", nil)

Callers

nothing calls this directly

Calls 1

loadPhaseOrderFunction · 0.85

Tested by

no test coverage detected