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

Function TestExport_NoEmbeddedAssets

apps/cli/internal/web/export_test.go:347–366  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

345}
346
347func TestExport_NoEmbeddedAssets(t *testing.T) {
348 taskDir := createTestTaskDir(t)
349 outDir := filepath.Join(t.TempDir(), "export")
350
351 // Use empty FS to simulate no embedded assets
352 err := ExportWithFS(ExportConfig{
353 OutputDir: outDir,
354 ScanDir: taskDir,
355 BasePath: "/",
356 Version: "test",
357 }, fstest.MapFS{})
358
359 if err == nil {
360 t.Fatal("expected error when no embedded assets")
361 }
362
363 if !strings.Contains(err.Error(), "no embedded web assets") {
364 t.Errorf("expected 'no embedded web assets' error, got: %v", err)
365 }
366}
367
368func TestExport_MissingIndexHTML(t *testing.T) {
369 taskDir := createTestTaskDir(t)

Callers

nothing calls this directly

Calls 3

createTestTaskDirFunction · 0.85
ExportWithFSFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected