(t *testing.T)
| 478 | } |
| 479 | |
| 480 | func TestPatchIndexHTML_RelativePaths(t *testing.T) { |
| 481 | input := `<head><script src="/assets/app.js"></script></head>` |
| 482 | result := patchIndexHTML(input, "/") |
| 483 | |
| 484 | if strings.Contains(result, `"/assets/`) { |
| 485 | t.Error("expected absolute asset paths to be rewritten") |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | func TestPatchIndexHTML_BasePathTrailingSlash(t *testing.T) { |
| 490 | input := `<head></head>` |
nothing calls this directly
no test coverage detected