MCPcopy Index your code
hub / github.com/angular/angular / asyncTest

Function asyncTest

packages/zone.js/test/test-util.ts:98–112  ·  view source on GitHub ↗
(this: unknown, testFn: Function, zone: Zone = Zone.current)

Source from the content-addressed store, hash-verified

96(isSupportSetErrorStack as any).message = 'supportSetErrorStack';
97
98export function asyncTest(this: unknown, testFn: Function, zone: Zone = Zone.current) {
99 const AsyncTestZoneSpec = (Zone as any)['AsyncTestZoneSpec'];
100 return (done: Function) => {
101 let asyncTestZone: Zone = zone.fork(
102 new AsyncTestZoneSpec(
103 () => {},
104 (error: Error) => {
105 fail(error);
106 },
107 'asyncTest',
108 ),
109 );
110 asyncTestZone.run(testFn, this, [done]);
111 };
112}
113
114export function isFirefox() {
115 const userAgent = navigator.userAgent.toLowerCase();

Calls 2

forkMethod · 0.65
runMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…