Skip to content

Commit 74461f1

Browse files
HiWangyeahloveloki
andauthored
Update src/content/reference/react/act.md
Co-authored-by: Xleine <xleine@qq.com>
1 parent 6214576 commit 74461f1

File tree

1 file changed

+1
-1
lines changed
  • src/content/reference/react

1 file changed

+1
-1
lines changed

src/content/reference/react/act.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ await act(async actFn)
1515
要将组件准备好进行断言,请将渲染代码和执行更新的操作包裹在 `await act()` 中。这能让你的测试更接近 React 在浏览器中的实际工作方式。
1616

1717
<Note>
18-
你可能会发现直接使用 `act()` 略显繁琐。为了减少样板代码,可以使用像 [React Testing Library](https://testing-library.com/docs/react-testing-library/intro)这样的库,其辅助方法已经内置了 `act()` 封装
18+
你可能会发现直接使用 `act()` 略显繁琐。为了减少样板代码,可以使用像 [React Testing Library](https://testing-library.com/docs/react-testing-library/intro)这样的库,其辅助方法已经内置了对 `act()` 的封装
1919
</Note>
2020

2121

0 commit comments

Comments
 (0)