Skip to content
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

wasm-pack --test does not accept the --tests cargo test option #1427

Open
stephanemagnenat opened this issue Sep 3, 2024 · 0 comments
Open

Comments

@stephanemagnenat
Copy link

🐛 Bug description

wasm-pack --test documentation says that it takes a PATH_AND_EXTRA_OPTIONS. So if I want my cargo test to run only the tests, I naturally would write (following cargo test documentation):

wasm-pack test --node --tests

But this generates the error:

error: the argument '--tests' cannot be used multiple times

However, if I run either of these:

wasm-pack test --node --lib
wasm-pack test --node --test MY_TEST_FILE

It behaves as advertised.

I understand that the underlying problem is how cargo is called, but yet ideally it would still work, or at least the limitations would be documented.

🤔 Expected Behavior

Only the tests of my project are run.

Note that I need to to this, because I do not want to run my examples that have dependencies that are not available under wasm32.

👟 Steps to reproduce

Just try to run wasm-pack test --node --tests in any wasm project

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.13.0
rustc version: 1.80.1 (3f5fd8dd4 2024-08-06)

@stephanemagnenat stephanemagnenat changed the title wasm-pack --test does not accept the --tests command wasm-pack --test does not accept the --tests cargo test option Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant