Commit efc3361
refactor(autocomplete): switch to fakeAsync tests (#8781)
* Switches (almost) all of the autocomplete tests to run in the `fakeAsync` zone.
* Adds a `MockNgZone` provider that allows us to flush out the `NgZone.onStable` subscriptions in `fakeAsync` tests.
* Fixes the "should close the panel when the user clicks away" test not doing anything due to being wrapped in a `whenStable` callback but not running in an async zone.
* Avoids recompiling all of the test components inside a `beforeEach`.
The above-mentioned changes cut down the autocomplete testing time from ~30sec to ~10sec.1 parent 3278931 commit efc3361
File tree
3 files changed
+364
-367
lines changed- src
- cdk/testing
- lib/autocomplete
3 files changed
+364
-367
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
0 commit comments