File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ sidebar: auto
77## mount
88
99Creates a Wrapper that contains the mounted and rendered Vue component to test.
10+ Note that when mocking dates/timers with Vitest, this must be called after
11+ ` vi.setSystemTime ` .
1012
1113** Signature:**
1214
Original file line number Diff line number Diff line change 22
33[[ toc]]
44
5+ ## Mocking Dates and Timers with Vitest
6+
7+ Vue's scheduler depends on the system time. Make sure to mount components
8+ * after* calling ` vi.setSystemTime ` , since Vue depends on its side effects.
9+ Mounting components before calling ` vi.setSystemTime ` may cause breaks in
10+ reactivity.
11+
12+ See [ vuejs/test-utils #2074 ] ( https://github.com/vuejs/test-utils/issues/2074 ) .
13+
514## Vue warn: Failed setting prop
615
716```
You can’t perform that action at this time.
0 commit comments