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
7
7
## mount
8
8
9
9
Creates 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 ` .
10
12
11
13
** Signature:**
12
14
Original file line number Diff line number Diff line change 2
2
3
3
[[ toc]]
4
4
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
+
5
14
## Vue warn: Failed setting prop
6
15
7
16
```
You can’t perform that action at this time.
0 commit comments