From 2a7d7acb43c57162973ac44333eb058b2cf956e2 Mon Sep 17 00:00:00 2001 From: yossarian Date: Thu, 27 Feb 2020 01:53:28 +0100 Subject: [PATCH] Contributor testing docs improvement (#969) * initial * Update CONTRIBUTING.md Co-authored-by: Justin Starry --- CONTRIBUTING.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2ceb69b3..215f6a266 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -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 ```