🐛 Bug description
wasm-pack test does not pass <extra_options> to cargo build --tests --target wasm32-unknown-unknown.
🤔 Expected Behavior
wasm-pack test --firefox -- --features some_feature
should invoke
cargo build --tests --target wasm32-unknown-unknown --features some_feature
👟 Steps to reproduce
Running
wasm-pack test --firefox -- --features some_feature
Causes error during tested crate compilation, since some_feature is not enabled.
Last log entry:
INFO 2019-08-08T19:58:57Z: wasm_pack::child: Running "cargo" "build" "--tests" "--target" "wasm32-unknown-unknown"
However, running:
cargo test --target wasm32-unknown-unknown --features some_feature
works.
Code example: https://github.com/alexlapa/wasm-pack-698-reproduction
Possible solution
It seems to me that there is no reason to run cargo build --tests --target wasm32-unknown-unknown when running wasm-pack test.
wasm-pack test will run wasm-bindgen-test, which will run cargo test, which will run cargo build --tests correctly propagating all extra options.
i.e. you can just remove step_build_tests
🌍 Your environment
wasm-pack version: 0.8.1
rustc version: 1.36.0 (a53f9df32 2019-07-03)
🐛 Bug description
wasm-pack testdoes not pass <extra_options> tocargo build --tests --target wasm32-unknown-unknown.🤔 Expected Behavior
should invoke
👟 Steps to reproduce
Running
Causes error during tested crate compilation, since
some_featureis not enabled.Last log entry:
However, running:
works.
Code example: https://github.com/alexlapa/wasm-pack-698-reproduction
Possible solution
It seems to me that there is no reason to run
cargo build --tests --target wasm32-unknown-unknownwhen runningwasm-pack test.wasm-pack testwill runwasm-bindgen-test, which will runcargo test, which will runcargo build --testscorrectly propagating all extra options.i.e. you can just remove step_build_tests
🌍 Your environment
wasm-pack version: 0.8.1
rustc version: 1.36.0 (a53f9df32 2019-07-03)