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

Function TestPrintBanner_ReadOnlyAndDev

apps/cli/internal/web/server_test.go:253–267  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

251}
252
253func TestPrintBanner_ReadOnlyAndDev(t *testing.T) {
254 dir := createTestTaskDir(t)
255 s := NewServer(Config{Port: 3000, ScanDir: dir, ReadOnly: true, Dev: true})
256
257 output := captureStdout(t, func() {
258 s.printBanner()
259 })
260
261 if !strings.Contains(output, "Read-only mode") {
262 t.Error("expected read-only message in banner")
263 }
264 if !strings.Contains(output, "Dev mode") {
265 t.Error("expected dev mode message in banner")
266 }
267}

Callers

nothing calls this directly

Calls 5

printBannerMethod · 0.95
createTestTaskDirFunction · 0.85
captureStdoutFunction · 0.85
ErrorMethod · 0.80
NewServerFunction · 0.70

Tested by

no test coverage detected