MCPcopy
hub / github.com/angular/angular / _runTest

Function _runTest

packages/zone.js/test/test-util.ts:54–67  ·  view source on GitHub ↗
(test: any, block: Function, otherwise?: Function, done?: Function)

Source from the content-addressed store, hash-verified

52}
53
54function _runTest(test: any, block: Function, otherwise?: Function, done?: Function) {
55 const message = test.message || test.name || test;
56 if (typeof test === 'string' ? !!global[test] : test()) {
57 if (done) {
58 block(done);
59 } else {
60 block();
61 }
62 } else {
63 console.log('WARNING: skipping ' + message + ' tests (missing this API)');
64 otherwise?.();
65 done?.();
66 }
67}
68
69export function supportPatchXHROnProperty() {
70 let desc = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, 'onload');

Callers 1

_ifEnvSupportsFunction · 0.85

Calls 2

logMethod · 0.65
testFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…