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

Function TestEdge_InvalidSortField

apps/cli/internal/cli/edge_cases_test.go:138–151  ·  view source on GitHub ↗

--- Invalid sort field ---

(t *testing.T)

Source from the content-addressed store, hash-verified

136// --- Invalid sort field ---
137
138func TestEdge_InvalidSortField(t *testing.T) {
139 tmpDir := createEdgeCaseTestFiles(t)
140 resetListFlags()
141 noColor = true
142 listSort = "nonexistent"
143
144 _, err := captureListOutput(t, tmpDir)
145 if err == nil {
146 t.Fatal("expected error for invalid sort field")
147 }
148 if !strings.Contains(err.Error(), "invalid sort field") {
149 t.Errorf("expected 'invalid sort field' in error, got: %v", err)
150 }
151}
152
153// --- Invalid format value ---
154

Callers

nothing calls this directly

Calls 4

createEdgeCaseTestFilesFunction · 0.85
resetListFlagsFunction · 0.85
captureListOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected