mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-20 08:16:31 +00:00
guide: refactor and update testing instructions for contributing
This commit is contained in:
@ -5,17 +5,11 @@ You can test the `web-sys` crate by running `cargo test` within the
|
||||
|
||||
```sh
|
||||
cd wasm-bindgen/crates/web-sys
|
||||
cargo test
|
||||
cargo test --target wasm32-unknown-unknown
|
||||
```
|
||||
|
||||
These tests all use a headless browser. See the [*Headless Browser
|
||||
Tests* section for details on setup and
|
||||
configuration.](../contributing.html#headless-browser-tests)
|
||||
|
||||
## Grouping Tests
|
||||
|
||||
Because headless tests can have significant setup and tear down overheads, try
|
||||
and group tests together. Instead of having a different `#[test]` for every
|
||||
method on some interface, have a single `#[test]` for the interface and all of
|
||||
its methods. This will keep the test suite running fast, resulting in better
|
||||
developer ergonomics and CI turn around times. Thanks!
|
||||
The Wasm tests all run within a headless browser. See [the `wasm-bindgen-test`
|
||||
crate's
|
||||
`README.md`](https://github.com/rustwasm/wasm-bindgen/blob/master/crates/test/README.md)
|
||||
for details and configuring which headless browser is used.
|
||||
|
Reference in New Issue
Block a user