(t *testing.T)
| 284 | } |
| 285 | |
| 286 | func TestExport_IndexHTML_BasePathRoot(t *testing.T) { |
| 287 | taskDir := createTestTaskDir(t) |
| 288 | outDir := filepath.Join(t.TempDir(), "export") |
| 289 | |
| 290 | err := exportWithMockFS(t, ExportConfig{ |
| 291 | OutputDir: outDir, |
| 292 | ScanDir: taskDir, |
| 293 | BasePath: "/", |
| 294 | Version: "test", |
| 295 | }) |
| 296 | if err != nil { |
| 297 | t.Fatalf("Export failed: %v", err) |
| 298 | } |
| 299 | |
| 300 | data, err := os.ReadFile(filepath.Join(outDir, "index.html")) |
| 301 | if err != nil { |
| 302 | t.Fatalf("failed to read index.html: %v", err) |
| 303 | } |
| 304 | |
| 305 | if !strings.Contains(string(data), `<base href="/">`) { |
| 306 | t.Error("expected <base href=\"/\"> tag for root base-path") |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | func TestExport_SPARouteFiles(t *testing.T) { |
| 311 | taskDir := createTestTaskDir(t) |
nothing calls this directly
no test coverage detected