mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-28 04:01:33 +00:00
18 lines
508 B
Markdown
18 lines
508 B
Markdown
# Testing on `wasm32-unknown-unknown` with `wasm-bindgen-test`
|
|
|
|
The `wasm-bindgen-test` crate is an experimental test harness for Rust programs
|
|
compiled to wasm using `wasm-bindgen` and the `wasm32-unknown-unknown`
|
|
target.
|
|
|
|
## Goals
|
|
|
|
* Write tests for wasm as similar as possible to how you normally would write
|
|
`#[test]`-style unit tests for native targets.
|
|
|
|
* Run the tests with the usual `cargo test` command but with an explicit wasm
|
|
target:
|
|
|
|
```
|
|
cargo test --target wasm32-unknown-unknown
|
|
```
|