Skip to content

Commit

Permalink
Contributor testing docs improvement (#969)
Browse files Browse the repository at this point in the history
* initial

* Update CONTRIBUTING.md

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
  • Loading branch information
captain-yossarian and jstarry authored Feb 27, 2020
1 parent 6a75932 commit 2a7d7ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ cargo build --target wasm32-unknown-unknown
```

#### Test
For the tests to work one have to ensure that `wasm-bindgen-cli` is installed.

##### Web Tests
First, ensure that `wasm-bindgen-cli` is installed.
[Instructions](https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/usage.html#install-the-test-runner)

Additionally a webdriver must be installed locally and configured to be on the
Expand All @@ -38,6 +40,13 @@ although more driver support may be added! You can download these at:
* chromedriver - http://chromedriver.chromium.org/downloads
* safaridriver - should be preinstalled on OSX

##### Macro Tests
When adding or updating tests, please make sure you have updated the appropriate `stderr` file, which you can find [here](https://github.com/yewstack/yew/tree/master/tests/macro) for the `html!` macro. These files ensure that macro compilation errors are correct and easy to understand.

To update or generate a new `stderr` file you can run `TRYBUILD=overwrite cargo test --test macro_test` or `TRYBUILD=overwrite cargo test --test derive_props_test`.

##### Running Tests

```bash
./ci/run_tests.sh
```
Expand Down

0 comments on commit 2a7d7ac

Please sign in to comment.