-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
119fbdd
commit 2ec696a
Showing
1 changed file
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters