mirror of
https://github.com/zensical/zensical.git
synced 2026-09-24 23:35:35 +00:00
test: test for minify plugin replacement failing
Signed-off-by: alexvoss <alex@corealization.com>
This commit is contained in:
+4
-2
@@ -192,8 +192,10 @@ def test_minifies_hashes_and_rewrites_external_assets(tmp_path: Path) -> None:
|
||||
assert f".{digest}.min." in path.name
|
||||
|
||||
html = (tmp_path / "site" / "index.html").read_text()
|
||||
assert f'src="./{script.relative_to(tmp_path / "site")}"' in html
|
||||
assert f'href="./{stylesheet.relative_to(tmp_path / "site")}"' in html
|
||||
script_url = script.relative_to(tmp_path / "site").as_posix()
|
||||
stylesheet_url = stylesheet.relative_to(tmp_path / "site").as_posix()
|
||||
assert f'src="./{script_url}"' in html
|
||||
assert f'href="./{stylesheet_url}"' in html
|
||||
assert 'type="module"' in html
|
||||
assert re.search(r"<script[^>]+ defer(?:=| |>)", html)
|
||||
assert (tmp_path / "site" / "assets" / "unchanged.txt").read_text() == (
|
||||
|
||||
Reference in New Issue
Block a user