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

Function TestRunImport_UnknownSource

apps/cli/internal/sync/import_engine_test.go:358–375  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

356}
357
358func TestRunImport_UnknownSource(t *testing.T) {
359 dir := t.TempDir()
360
361 cfg := ImportConfig{
362 SourceName: "nonexistent",
363 SourceCfg: SourceConfig{Name: "nonexistent"},
364 OutputDir: filepath.Join(dir, "tasks"),
365 ScanDir: dir,
366 }
367
368 _, err := RunImport(cfg)
369 if err == nil {
370 t.Fatal("expected error for unknown source")
371 }
372 if !strings.Contains(err.Error(), "unknown source") {
373 t.Errorf("expected 'unknown source' in error, got: %v", err)
374 }
375}
376
377func TestRunImport_FetchError(t *testing.T) {
378 sourceName := "test-import-fetcherr"

Callers

nothing calls this directly

Calls 2

RunImportFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected