You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(zone.js): patch global instead of Mocha object (#45047)
Close#42834
In the new version fo Mocha, all global test functions are from `global`
object instead of `Mocha` object. Adn the current `zone.js` Mocha
patch's logic looks like this.
```
global.describe = Mocha.describe = function() {
return originalMochaDescribe.apply(this, arguments);
}
```
and `originalMochaDescribe` is the unpathced Mocha implementation
looks like this
```
function describe() {
return context.describe(...);
}
```
And the `context` will finally delegate to `global.describe()`,
so the current `zone.js` patch causes infinite loop.
This commit will not patch function of `Mocha` object any longer.
PR Close#45047
0 commit comments