Commit 2583279
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 4865d84 commit 2583279
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| |||
0 commit comments