Commit dd40f25
authored
fix(cdk/testing): Skip task tracking if zone patches aren't present (#32544)
This commit omits the initialization of the `taskState` when the
constructor executes outside the proxy zone. This would generally
indicate that either `zone.js/dist/zone-testing.js` was not included
_or_ it does not include patches for the test framework being used
(e.g. Vitest). In this case, we should simply omit the initialization of
task state tracking, meaning that `waitForTasksOutsideAngular` will "not
work" and simply be a `Promise.resolve`.
fixes #325421 parent e63c564 commit dd40f25
File tree
2 files changed
+11
-1
lines changed- src/cdk/testing/testbed
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
| |||
0 commit comments