Skip to content

WASM test coverage is not feasible in 2025 #140

@RAprogramm

Description

@RAprogramm

Problem

WASM test coverage with wasm-bindgen-test cannot be reliably implemented with current tooling.

Investigation Results

After extensive research and testing:

  1. wasmcov - Does not work with wasm-bindgen-test, runs native tests instead
  2. wasm-bindgen-test coverage - Experimental, unstable, requires complex setup
  3. No public examples - No working GitHub repositories with WASM coverage + codecov
  4. LLVM profraw files - Not generated without browser/node runner executing tests
  5. wasm-bindgen project - Disables coverage where possible

Technical Issues

  • cargo wasmcov test executes native tests, not wasm32 target
  • profraw files are not generated without test execution
  • lcov output is empty (0 bytes)
  • Requires browser/node runner with complex LLVM tooling setup
  • Feature is marked as experimental and unreliable

Solution

Removed WASM coverage job from CI in PR #139:

  • Removed wasm-coverage job from workflow
  • Removed wasmcov dependency
  • Removed capture_coverage function
  • Updated codecov configuration
  • Keep only native coverage which works correctly

Native coverage provides comprehensive test coverage and works reliably.

Future

This can be revisited when:

  • wasm-bindgen-test coverage becomes stable
  • Working tools and examples are available
  • Community adoption increases

Closes #130

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions