2025-08-26 22:03:06 +09:00

25 lines
877 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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)。