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 default output text can be hard to interpret #784

Open
yoshuawuyts opened this issue Feb 5, 2020 · 1 comment
Open

wasm-pack test default output text can be hard to interpret #784

yoshuawuyts opened this issue Feb 5, 2020 · 1 comment
Labels
bug Something isn't working PR welcome

Comments

@yoshuawuyts
Copy link
Contributor

🐛 Bug description

When running wasm-pack test the following is printed to the screen:

Interactive browsers tests are now available at http://127.0.0.1:8000

Note that interactive mode is enabled because `NO_HEADLESS`
is specified in the environment of this process. Once you're
done with testing you'll need to kill this server with
Ctrl-C.

wasm-pack refers to a configuration NO_HEADLESS being specified as part of the environment. However I haven't specified any env flags which makes it a bit confusing to figure out where this is coming from. Also the double negative for the flag threw me off a bit: to enable headless mode we need to omit an env var we don't remember setting? That was my reading of the text, and it confused me.

🤔 Expected Behavior

Probably most people would want to run the tests in headless mode, which can be done through by passing --headless to wasm-pack test. Drawing people's attention to this in the copy might be helpful:

Interactive browsers tests are now available at http://127.0.0.1:8000

Note that headless mode can be enabled by passing the `--headless`
to `wasm-pack test`. Once you're done with testing you'll need to
kill this server with Ctrl-C.

👟 Steps to reproduce

This is one of the first pieces of copy users will see when running wasm-pack test.

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.9.0
rustc version: 1.41.0
os: windows

@yoshuawuyts yoshuawuyts changed the title wasm-pack refers to NO_HEADLESS flag that isn't part of Path wasm-pack test default output text can be hard to interpret Feb 5, 2020
@ashleygwilliams ashleygwilliams added bug Something isn't working needs design PR welcome and removed needs design labels Feb 5, 2020
@ashleygwilliams
Copy link
Member

thanks for filing @yoshuawuyts !! super agree with this- this error message actually exists in wasm-bindgen-test (https://github.com/rustwasm/wasm-bindgen/blob/935f71afecd9921d827acd64b8ea420dde947e01/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs#L162)

i believe the root of the issue is the error message is useful for users who are running wasm-bindgen test directly, but very few (maybe?) actually do. we should reconcile the error in that repo, or at the very least intercept it in wasm-pack and update it to the language you suggest. @fitzgen do you have any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR welcome
Projects
None yet
Development

No branches or pull requests

2 participants