| 1 |
# Testing on `wasm32-unknown-unknown` with `wasm-bindgen-test` |
| 2 |
|
| 3 |
The `wasm-bindgen-test` crate is an experimental test harness for Rust programs |
| 4 |
compiled to wasm using `wasm-bindgen` and the `wasm32-unknown-unknown` |
| 5 |
target. |
| 6 |
|
| 7 |
## Goals |
| 8 |
|
| 9 |
* Write tests for wasm as similar as possible to how you normally would write |
| 10 |
`#[test]`-style unit tests for native targets. |
| 11 |
|
| 12 |
* Run the tests with the usual `cargo test` command but with an explicit wasm |
| 13 |
target: |
| 14 |
|
| 15 |
``` |
| 16 |
cargo test --target wasm32-unknown-unknown |
| 17 |
``` |