wasm-pack-test-all

Crates.iowasm-pack-test-all
lib.rswasm-pack-test-all
version0.1.2
created_at2025-05-05 12:36:55.14536+00
updated_at2025-05-08 21:10:55.062806+00
descriptionWrapper for `wasm-pack test` that runs tests for all crates in a workspace or directory.
homepage
repositoryhttps://github.com/mondeja/wasm-pack-test-all
max_upload_size
id1660660
size54,162
Álvaro Mondéjar Rubio (mondeja)

documentation

README

wasm-pack-test-all

License Tests Crates.io downloads

Wrapper for wasm-pack test that runs tests for all crates in a workspace or directory.

Installation

Build from source

cargo install wasm-pack wasm-pack-test-all

Standalone pre-built binaries

Download standalone pre-built binaries from releases page.

Cargo binaries

Install from pre-built binaries using cargo-binstall:

cargo binstall wasm-pack-test-all

With pre-commit

Use it with pre-commit by adding the hook to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/mondeja/wasm-pack-test-all
    rev: vX.Y.Z
    hooks:
      - id: wasm-pack-test-all
        args: [tests/end2end, --chrome]

Usage

wasm-pack-test-all [-h/--help] [-V/--version] [PATH] [WASM_PACK_TEST_OPTIONS] [-- EXTRA_OPTIONS]

The crates to test are discovered inside the current directory or the provided path.

With the workspace feature enabled, it will run wasm-pack test for all crates in the workspace which directory is the current directory or the provided path. If the workspace feature is not enabled, it will run wasm-pack test for all crates in the directory and subdirectories.

Providing extra options, they will be passed to wasm-pack test for each crate. To pass options to wasm-bindgen-test-runner and cargo test, use the -- separator.

Don't pass a path to wasm-pack test options, as it will be interpreted as a crate path and wasm-pack-test-all will trigger an error. If you want to test a crate individually, use wasm-pack test directly.

Examples

wasm-pack-test-all --node
wasm-pack-test-all tests/end2end --chrome
wasm-pack-test-all tests/end2end --firefox --release -- --offline

Features

All crate features are disabled by default.

  • workspace: Enable workspace support. When using this feature, when no path argument is provided, wasm-pack-test-all will try to discover a workspace in the current directory and run wasm-pack test for all crates in the workspace. If a path is provided, it will try to discover a workspace in the provided path and run wasm-pack test for all crates in the workspace.
Commit count: 8

cargo fmt