Prevent GloablErrors from being monkey patched
All current shipped versions of zone.js contain a monkey patch that fails to pass constructor arguments on to GlobalErrors. That would crash Jasmine if it was applied early enough to have any effect. See <https://github.com/angular/angular/issues/63072>.
This commit is contained in:
@@ -11,6 +11,7 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
options = options || {};
|
||||
|
||||
const self = this;
|
||||
const GlobalErrors = options.GlobalErrors || j$.GlobalErrors;
|
||||
const global = options.global || j$.getGlobal();
|
||||
|
||||
const realSetTimeout = global.setTimeout;
|
||||
@@ -24,7 +25,7 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
new j$.MockDate(global)
|
||||
);
|
||||
|
||||
const globalErrors = new j$.GlobalErrors(
|
||||
const globalErrors = new GlobalErrors(
|
||||
undefined,
|
||||
// Configuration is late-bound because GlobalErrors needs to be constructed
|
||||
// before it's set to detect load-time errors in browsers
|
||||
|
||||
Reference in New Issue
Block a user