Commit 0dc1748
committed
test(unit): mock async components in Validation.spec to fix vitest worker errors
defineAsyncComponent triggers internal Vite dev-server fetch requests
when the component is registered. When the vitest worker closes after
all tests finish, those fetches are still pending, producing 13
'Closing rpc while fetch was pending' unhandled rejections.
Mocking the three async component modules prevents the dynamic
imports from ever being initiated during the test run.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>1 parent b260d8d commit 0dc1748
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
0 commit comments