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

Function TestPatchIndexHTML_RelativePaths

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

Source from the content-addressed store, hash-verified

478}
479
480func 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
489func TestPatchIndexHTML_BasePathTrailingSlash(t *testing.T) {
490 input := `<head></head>`

Callers

nothing calls this directly

Calls 2

patchIndexHTMLFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected