We're working on making it easy to test components, but this is currently a work in progress.
Support for shallow rendering and a proposal to expose the code Yew uses internally for testing components can be found in the GitHub repository.
The Rust Wasm working group maintains a crate called
wasm_bindgen_test which allows you to run tests in a browser in similar fashion to how
#[test] procedural macro works. More information is given in the Rust Wasm working group's documentation
for this module.