Function wasm_pack::build::cargo_build_wasm_tests
source · [−]pub fn cargo_build_wasm_tests(
path: &Path,
debug: bool,
extra_options: &[String]
) -> Result<(), Error>
Expand description
Runs cargo build --tests
targeting wasm32-unknown-unknown
.
This generates the Cargo.lock
file that we use in order to know which version of
wasm-bindgen-cli to use when running tests.
Note that the command to build tests and the command to run tests must use the same parameters, i.e. features to be
disabled / enabled must be consistent for both cargo build
and cargo test
.
Parameters
path
: Path to the crate directory to build tests.debug
: Whether to build tests indebug
mode.extra_options
: Additional parameters to pass tocargo
when building tests.