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

Function exportWithMockFS

apps/cli/internal/web/export_test.go:44–47  ·  view source on GitHub ↗

exportWithMockFS runs Export after temporarily replacing StaticFiles. Since StaticFiles() returns an empty FS in non-embed builds, we use ExportWithFS which accepts an explicit FS for testing.

(t *testing.T, cfg ExportConfig)

Source from the content-addressed store, hash-verified

42// Since StaticFiles() returns an empty FS in non-embed builds, we
43// use ExportWithFS which accepts an explicit FS for testing.
44func exportWithMockFS(t *testing.T, cfg ExportConfig) error {
45 t.Helper()
46 return ExportWithFS(cfg, mockStaticFS())
47}
48
49func TestExport_OutputStructure(t *testing.T) {
50 taskDir := createTestTaskDir(t)

Callers 13

TestExport_TasksJSONFunction · 0.85
TestExport_BoardJSONFunction · 0.85
TestExport_ConfigJSONFunction · 0.85
TestExport_SPARouteFilesFunction · 0.85
TestExport_CustomOutputFunction · 0.85
TestExport_GraphJSONFunction · 0.85
TestExport_StatsJSONFunction · 0.85

Calls 2

ExportWithFSFunction · 0.85
mockStaticFSFunction · 0.85

Tested by

no test coverage detected