Skip to content

Commit

Permalink
Update testing docs for wasm-bindgen-macro (rustwasm#4256)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Nov 9, 2024
1 parent a8b1a09 commit 3dc8c29
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/macro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ To add a test:
* Create `ui-tests/my-awesome-test.rs`
* Write an invalid `#[wasm_bindgen]` invocation, testing the error you're
generating
* Execute `cargo test -p ui-tests`, the test will fail
* Execute `cargo test -p wasm-bindgen-macro --test ui`, the test will fail
* From within the `ui-tests` folder, execute `./update-all-references.sh`. This
should create a `my-awesome-test.stderr` file.
* Inspect `my-awesome-test.stderr` to make sure it looks ok
* Rerun `cargo test -p ui-tests` and your tests should pass!

Testing here is a work in progress, see
[#601](https://github.com/rustwasm/wasm-bindgen/issues/601) for more
information.
OR if you are on Windows, set the `TRYBUILD=overwrite` environment variable (this is done as `$env:TRYBUILD="overwrite"` [in powershell](https://stackoverflow.com/a/1333717/7595472)) and run the command again.
* Inspect `my-awesome-test.stderr` to make sure it looks ok
* Rerun `cargo test -p wasm-bindgen-macro --test ui` and your tests should pass!

0 comments on commit 3dc8c29

Please sign in to comment.