Commit 3f47f37
committed
fix(@angular/build): correct Vitest builder watch mode execution
The experimental Vitest-based unit test builder did not always correctly re-run tests in watch mode.
This commit refactors the Vitest executor to provide more accurate watch mode behavior by:
- Using `createVitest` to create a persistent instance that can be programmatically controlled.
- Disabling Vitest's internal file watcher (`watch: false`) to make the Angular builder's watcher the single source of truth.
- Triggering a test run via `vitest.start()` within the `execute` method after each incremental build is complete.1 parent b3dfc91 commit 3f47f37
File tree
1 file changed
+8
-4
lines changed- packages/angular/build/src/builders/unit-test/runners/vitest
1 file changed
+8
-4
lines changedLines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | | - | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
102 | | - | |
| 107 | + | |
103 | 108 | | |
104 | | - | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
| |||
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
113 | | - | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
0 commit comments