MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestCmdListTasksEmptyJSON

Function TestCmdListTasksEmptyJSON

internal/app/list_test.go:927–941  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

925}
926
927func TestCmdListTasksEmptyJSON(t *testing.T) {
928 _, _ = showListEditDB(t)
929 out := captureStdout(t, func() {
930 if rc := cmdList([]string{"tasks", "--format", "json"}); rc != 0 {
931 t.Fatalf("rc=%d", rc)
932 }
933 })
934 var rows []taskListRow
935 if err := json.Unmarshal([]byte(out), &rows); err != nil {
936 t.Fatalf("empty-result JSON should parse, got %v\nout=%q", err, out)
937 }
938 if len(rows) != 0 {
939 t.Errorf("expected empty array, got %d rows", len(rows))
940 }
941}
942
943func TestCmdListTasksSlugAlwaysFull(t *testing.T) {
944 // Slugs are emitted in full by default — there's no length cap. The

Callers

nothing calls this directly

Calls 3

showListEditDBFunction · 0.85
captureStdoutFunction · 0.85
cmdListFunction · 0.85

Tested by

no test coverage detected