Code coverage for JS
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adsooi 2024-09-28 03:49:14 +02:00
parent a2443d7915
commit e9d204daab
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
4 changed files with 6 additions and 2 deletions

View file

@ -43,7 +43,7 @@ def test_setup():
def test_map_source():
sourcemap_available = debug.SOURCEMAP_INDEX is not None
if sourcemap_available:
assert debug.map_javascript_source("js/index.mjs", 22) == ("js/module/interface.mjs", 23)
assert debug.map_javascript_source("js/index.mjs", 22) != ("js/module/index.mjs", 22)
assert debug.map_javascript_source("js/index.mjs", 100000) == ("js/index.mjs", 100000) # Too long, not found
debug.SOURCEMAP_INDEX = None
assert debug.map_javascript_source("js/index.mjs", 21) == ("js/index.mjs", 21)