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

Function TestPrintImportTable_Summary

apps/cli/internal/cli/importcmd_test.go:825–844  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

823}
824
825func TestPrintImportTable_Summary(t *testing.T) {
826 result := &sync.ImportResult{
827 Created: []sync.ImportAction{
828 {ExternalID: "1", LocalID: "001", Title: "Created"},
829 },
830 Skipped: []sync.ImportAction{
831 {ExternalID: "2", Title: "Skipped"},
832 },
833 Errors: []sync.SyncError{
834 {ExternalID: "3", Title: "Error", Err: fmt.Errorf("fail")},
835 },
836 }
837 summary := importSummary{Total: 3, Created: 1, Skipped: 1, Errors: 1}
838
839 output := capturePrintImportTable(t, result, summary, false)
840
841 if !strings.Contains(output, "Done: 3 total, 1 created, 1 skipped, 1 errors") {
842 t.Errorf("expected summary line, got %q", output)
843 }
844}

Callers

nothing calls this directly

Calls 1

capturePrintImportTableFunction · 0.85

Tested by

no test coverage detected