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

Function TestGet_Threshold

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

Source from the content-addressed store, hash-verified

356}
357
358func TestGet_Threshold(t *testing.T) {
359 tmpDir := createGetTestFiles(t)
360 resetGetFlags()
361 taskDir = tmpDir
362 getThreshold = 0.95 // very high threshold
363
364 err := runGet(getCmd, []string{"aut"})
365 if err == nil {
366 t.Fatal("Expected error when threshold filters out matches")
367 }
368 if !strings.Contains(err.Error(), "task not found") {
369 t.Errorf("Expected 'task not found' error, got: %v", err)
370 }
371}
372
373func TestGet_EmptyDirectory(t *testing.T) {
374 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 4

createGetTestFilesFunction · 0.85
resetGetFlagsFunction · 0.85
runGetFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected