Skip to content

Commit

Permalink
Add guide for running doctest (#4393)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spxg authored Jan 7, 2025
1 parent d59de5c commit c9ee617
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions guide/src/wasm-bindgen-test/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,9 @@ Run the tests by passing `--target wasm32-unknown-unknown` to `cargo test`:
```
cargo test --target wasm32-unknown-unknown
```

If you also need to run doctests, add the unstable [`-Zdoctest-xcompile`](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#doctest-xcompile) flag. This requires using the Rust nightly channel like this:

```
cargo +nightly test --target wasm32-unknown-unknown -Zdoctest-xcompile
```

0 comments on commit c9ee617

Please sign in to comment.