MCPcopy
hub / github.com/angular/angular / wrapAsyncTest

Function wrapAsyncTest

packages/zone.js/test/zone-spec/async-test.spec.ts:461–473  ·  view source on GitHub ↗
(fn: Function, doneFn?: Function)

Source from the content-addressed store, hash-verified

459 const asyncTest: any = (Zone as any)[Zone.__symbol__('asyncTest')];
460
461 function wrapAsyncTest(fn: Function, doneFn?: Function) {
462 return function (this: unknown, done: Function) {
463 const asyncWrapper = asyncTest(fn);
464 return asyncWrapper.apply(this, [
465 function (this: unknown) {
466 if (doneFn) {
467 doneFn();
468 }
469 return done.apply(this, arguments);
470 },
471 ]);
472 };
473 }
474
475 describe('async', () => {
476 describe('non zone aware async task in promise should be detected', () => {

Callers 1

async-test.spec.tsFile · 0.85

Calls 2

applyMethod · 0.65
asyncTestFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…