aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_asset_versioning.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/test_asset_versioning.py')
-rw-r--r--packages/meshbay-hub/tests/test_asset_versioning.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/meshbay-hub/tests/test_asset_versioning.py b/packages/meshbay-hub/tests/test_asset_versioning.py
index 7057311..2d90a51 100644
--- a/packages/meshbay-hub/tests/test_asset_versioning.py
+++ b/packages/meshbay-hub/tests/test_asset_versioning.py
@@ -32,7 +32,10 @@ def client():
def _shell_refs(html: str) -> list[str]:
- return re.findall(r'(?:src|href)="([^"]+)"', html)
+ """What the shell loads: script sources and <link> files. Not the canonical
+ link nor the <noscript> anchors, which name pages rather than fetch them."""
+ return (re.findall(r'src="([^"]+)"', html)
+ + re.findall(r'<link rel="(?!canonical")[^"]+" href="([^"]+)"', html))
def test_every_asset_the_shell_loads_is_versioned(client):