The browser runtime vera/browser/runtime.mjs is at 57.79% coverage per codecov. The c8 infrastructure was added in #337/#343, but the parity tests don't exercise enough of the runtime code paths.
Current gaps (estimated)
- Map/Set/Decimal host imports — many type-specific branches untested
- Json host imports (new in this release) — writeJson/readJson untested in browser
- Markdown marshalling — some constructor paths untested
- Error paths — contract violations, invalid inputs
Approach
Add targeted browser parity tests in tests/test_browser.py that exercise:
- Each Map value type variant (Int, Float64, String, Bool)
- Each Set element type variant
- Decimal operations (arithmetic, comparison, conversion)
- Json parse/stringify with nested objects and arrays
- Error paths (invalid JSON, contract violations)
The c8 coverage data is already collected during VERA_JS_COVERAGE=1 pytest tests/test_browser.py — we just need more test cases.
Target: >80% line coverage on runtime.mjs.
The browser runtime
vera/browser/runtime.mjsis at 57.79% coverage per codecov. Thec8infrastructure was added in #337/#343, but the parity tests don't exercise enough of the runtime code paths.Current gaps (estimated)
Approach
Add targeted browser parity tests in
tests/test_browser.pythat exercise:The
c8coverage data is already collected duringVERA_JS_COVERAGE=1 pytest tests/test_browser.py— we just need more test cases.Target: >80% line coverage on runtime.mjs.