Skip to content

fix: WASM browser tests timeout in CI #261

Closed as not planned
Closed as not planned

Description

@robcohen

Summary

The WASM browser tests (headless Chrome) consistently timeout in CI, completing only 6 of 21 tests before the 120-second timeout.

Current State

Browser tests have been disabled in .github/workflows/wasm.yml (if: false). Node.js tests still run and provide equivalent coverage.

Test Results Before Timeout

running 21 tests
test test_version ... ok
test test_validate_source_valid ... ok
test test_validate_source_invalid ... ok
test test_serialization_uses_null_not_undefined ... ok
test test_run_plugin_unknown ... ok
test test_run_plugin ... ok

Failed to detect test as having been run. It might have timed out.

Investigation Needed

  1. Which of the remaining 15 tests is slow/hanging?
  2. Is it a wasm-bindgen-test issue with the overall session timeout?
  3. Are tests running in parallel causing resource contention?

Potential Fixes

  • Identify and optimize slow tests
  • Increase WASM_BINDGEN_TEST_TIMEOUT (currently 120s)
  • Run tests serially instead of parallel
  • Split tests into smaller groups
  • Use --no-capture to debug which test hangs

Workaround

Node.js tests (wasm-pack test --node) run successfully and test the same functionality. Browser-specific behavior is minimal.

Re-enabling

To re-enable browser tests, change if: false to if: github.event_name == 'push' in .github/workflows/wasm.yml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions