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

Function TestWebStart_NonExistentDirectory

apps/cli/internal/cli/web_test.go:17–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15}
16
17func TestWebStart_NonExistentDirectory(t *testing.T) {
18 resetWebFlags()
19 taskDir = "/nonexistent/path/that/does/not/exist"
20
21 err := runWebStart(webStartCmd, nil)
22 if err == nil {
23 t.Fatal("expected error for non-existent directory")
24 }
25
26 if !strings.Contains(err.Error(), "not a valid directory") {
27 t.Errorf("expected 'not a valid directory' error, got: %v", err)
28 }
29}
30
31func TestWebStart_FileInsteadOfDirectory(t *testing.T) {
32 resetWebFlags()

Callers

nothing calls this directly

Calls 3

resetWebFlagsFunction · 0.85
runWebStartFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected