test: register enrichment-manager.js in script-split-integrity scan
The onclick-coverage guard only scans the split modules + a hardcoded extras list, so it flagged openEnrichmentManager() (defined in the new, loaded enrichment-manager.js) as undefined. Add enrichment-manager.js to the scanned non-split files. The function genuinely exists and is loaded via its script tag.
This commit is contained in:
parent
b0d5008673
commit
e1fd1f2489
1 changed files with 3 additions and 2 deletions
|
|
@ -51,7 +51,8 @@ SPLIT_MODULES = [
|
|||
]
|
||||
|
||||
# Other JS files that exist in static/ but are NOT part of the split
|
||||
NON_SPLIT_JS = {"setup-wizard.js", "docs.js", "helper.js", "particles.js", "worker-orbs.js"}
|
||||
NON_SPLIT_JS = {"setup-wizard.js", "docs.js", "helper.js", "particles.js", "worker-orbs.js",
|
||||
"enrichment-manager.js"}
|
||||
|
||||
# Pre-existing duplicate helper functions that lived in the original monolith.
|
||||
# In a plain <script> context the last-loaded declaration wins. These are NOT
|
||||
|
|
@ -216,7 +217,7 @@ class TestOnclickCoverage:
|
|||
self.all_fns.update(_all_function_decls(text))
|
||||
|
||||
# Also include non-split JS files that are loaded
|
||||
for extra in ("setup-wizard.js", "docs.js", "helper.js"):
|
||||
for extra in ("setup-wizard.js", "docs.js", "helper.js", "enrichment-manager.js"):
|
||||
path = _STATIC / extra
|
||||
if path.exists():
|
||||
self.all_fns.update(_all_function_decls(_read(path)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue