* Get a promise that resolves when the fixture is stable. * * This can be used to resume testing after events have triggered asynchronous activity or * asynchronous change detection.
()
| 232 | * asynchronous change detection. |
| 233 | */ |
| 234 | whenStable(): Promise<any> { |
| 235 | if (this.isStable()) { |
| 236 | return Promise.resolve(false); |
| 237 | } |
| 238 | |
| 239 | return new Promise((resolve, reject) => { |
| 240 | this.appErrorHandler.whenStableRejectFunctions.add(reject); |
| 241 | this._appRef.whenStable().then(() => { |
| 242 | this.appErrorHandler.whenStableRejectFunctions.delete(reject); |
| 243 | resolve(true); |
| 244 | }); |
| 245 | }); |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * Retrieves all defer block fixtures in the component fixture. |
no test coverage detected