mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
25 lines
865 B
Plaintext
25 lines
865 B
Plaintext
---
|
||
title: '测试应用'
|
||
description: '测试你的应用'
|
||
---
|
||
|
||
:::info
|
||
我们正在努力让测试组件变得更容易,但目前仍在进行中。
|
||
|
||
在 GitHub 仓库中可以找到对 [浅渲染](https://github.com/yewstack/yew/issues/1413) 的支持。
|
||
:::
|
||
|
||
## 快照测试
|
||
|
||
Yew 提供了 `yew::tests::layout_tests` 模块来方便组件的快照测试。
|
||
|
||
:::important 改进文档
|
||
我们需要帮助,以改进快照测试的文档。
|
||
:::
|
||
|
||
## wasm_bindgen_test
|
||
|
||
Rust/WASM 工作组维护了一个叫做 [`wasm_bindgen_test`](https://wasm-bindgen.github.io/wasm-bindgen/wasm-bindgen-test/index.html) 的 crate,
|
||
它允许你以类似于内置的 `#[test]` 过程宏的方式在浏览器中运行测试。
|
||
有关此模块的更多信息,请参阅 [Rust Wasm 工作组的文档](https://wasm-bindgen.github.io/wasm-bindgen/wasm-bindgen-test/index.html)。
|