Skip to content

Commit c9ee617

Browse files
authored
Add guide for running doctest (#4393)
1 parent d59de5c commit c9ee617

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

guide/src/wasm-bindgen-test/usage.md

+6
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,9 @@ Run the tests by passing `--target wasm32-unknown-unknown` to `cargo test`:
127127
```
128128
cargo test --target wasm32-unknown-unknown
129129
```
130+
131+
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:
132+
133+
```
134+
cargo +nightly test --target wasm32-unknown-unknown -Zdoctest-xcompile
135+
```

0 commit comments

Comments
 (0)