-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passes extra_options
to cargo build --tests
when running wasm-pack test
.
#851
Passes extra_options
to cargo build --tests
when running wasm-pack test
.
#851
Conversation
So if I get it, users must correctly use |
no (or at least, that's not intentionally the UI, but a result of how cargo works) the remainder after the first cargo test --features "feature" -- test_name under wasm-pack test -- --features "feature" -- test_name The special handling for
It does, which is how I discovered the If we could remove the need for the first |
Thanks, though I think this needs to wait for #805 to land, since it changes the way that |
0f29c0c
to
f583209
Compare
Heya, I've rebased over |
Just noticed I didn't get back to this before. Just know that with cargo test you can do:
That's why I think this isn't very intuitive and should be well documented in |
@najamelan Heya, I had one more go, and managed to convince
If that doesn't sit well for this project, I could undo it and just add edit: ah,
|
Heya @najamelan / @Pauan, I managed to get So now users can run: wasm-pack test --features "feature" -- test_name # which corresponds to:
# cargo test --features "feature" -- test_name The In the implementation, I tell I'm really keen on seeing this through, as it would enable the |
@azriel91 Unfortunately it's impossible, because only @ashleygwilliams has the rights to publish new changes, and she has disappeared. |
Any ETA on merging this? |
It would be good to have this functionality. |
This allows the extra arguments to be forwarded through to `cargo` without requiring `--` beforehand.
This allows `wasm-pack` to have the same command line interface as `cargo` to pass through options such as `--no-default-features`.
0671182
to
1f13f25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @azriel91!
Fix example commands in docs broken by PR #851
Fixes #698.
Before this change, when running
wasm-pack test -- --features "feature" -- test_filter
,wasm-pack
runsNow it does:
The command to build tests is only used once throughout the whole code base, that's why I passed the
extra_options
through without wrapping inOption<_>
.Comes with a
compile_error!
test too ✌️.Make sure these boxes are checked! 📦✅
rustfmt
installedcargo fmt
on the code base before submitting✨✨ 😄 Thanks so much for contributing to wasm-pack! 😄 ✨✨
✌️ welcome 🙇♂️!