Crates.io | dominator-testing |
lib.rs | dominator-testing |
version | 0.1.0 |
source | src |
created_at | 2024-07-29 19:23:19.973006 |
updated_at | 2024-07-29 19:23:19.973006 |
description | Helpers for testing dominator UIs with wasm-bindgen-test |
homepage | https://github.com/JedimEmO/dominator-testing |
repository | https://github.com/JedimEmO/dominator-testing |
max_upload_size | |
id | 1319141 |
size | 14,854 |
Utility crate for writing tests for DOMINATOR UIs.
DOMINATOR is a framework for making high performance web applications using signals. Head over to https://github.com/Pauan/rust-dominator to learn more!
For more information on testing in the browser, check out the chapter on testing here: https://jedimemo.github.io/dominator-book/techniques_and_patterns/testing.html
To run the tests locally, you need a few dependencies on your system.
First of all, you need rust. Install it following the instructions for your system at https://rustup.rs/
You also need the wasm32-unknown-unknown
target:
rustup target add wasm32-unknown-unknown
You will also need a web- or chromedriver to be present. The simplest way is to install chromium, it bundles with its own chromedriver:
apt install chromium
And finally you will need the wasm-bindgen-cli
tool to be able to run the in-browser tests:
cargo install wasm-bindgen-cli
Now you can run tests with the following commands:
CHROMEDRIVER=chromium.chromedriver cargo test --target wasm32-unknown-unknown