MCPcopy Create free account
hub / github.com/angular/angular / whenStable

Function whenStable

packages/core/testing/src/fixture.ts:218–230  ·  view source on GitHub ↗

* 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.

()

Source from the content-addressed store, hash-verified

216 * asynchronous change detection.
217 */
218 whenStable(): Promise<any> {
219 if (this.isStable()) {
220 return Promise.resolve(false);
221 }
222
223 return new Promise((resolve, reject) => {
224 this.appErrorHandler.whenStableRejectFunctions.add(reject);
225 this._appRef.whenStable().then(() => {
226 this.appErrorHandler.whenStableRejectFunctions.delete(reject);
227 resolve(true);
228 });
229 });
230 }
231
232 private _getRenderer() {
233 if (this._renderer === undefined) {

Callers

nothing calls this directly

Calls 7

resolveFunction · 0.70
isStableMethod · 0.65
resolveMethod · 0.65
addMethod · 0.65
thenMethod · 0.65
whenStableMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected