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

Function TestExport_WithoutEmbeddedAssets

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

Source from the content-addressed store, hash-verified

597}
598
599func TestExport_WithoutEmbeddedAssets(t *testing.T) {
600 // Export() uses StaticFiles() which returns an empty FS in test builds.
601 taskDir := createTestTaskDir(t)
602 outDir := filepath.Join(t.TempDir(), "export")
603
604 err := Export(ExportConfig{
605 OutputDir: outDir,
606 ScanDir: taskDir,
607 BasePath: "/",
608 Version: "test",
609 })
610
611 if err == nil {
612 t.Fatal("expected error from Export() without embedded assets")
613 }
614 if !strings.Contains(err.Error(), "no embedded web assets") {
615 t.Errorf("expected 'no embedded web assets' error, got: %v", err)
616 }
617}
618
619func TestWriteJSONFile_MarshalError(t *testing.T) {
620 dir := t.TempDir()

Callers

nothing calls this directly

Calls 3

createTestTaskDirFunction · 0.85
ExportFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected