3 unstable releases
new 0.1.1 | May 6, 2025 |
---|---|
0.1.0 | May 5, 2025 |
0.0.1 | May 5, 2025 |
#97 in WebAssembly
87 downloads per month
27KB
605 lines
wasm-pack-test-all
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 runwasm-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 runwasm-pack test
for all crates in the workspace.
Dependencies
~175KB