fix(patch): fix #744, add namespace to load patch name#774
fix(patch): fix #744, add namespace to load patch name#774mhevery merged 3 commits intoangular:masterfrom
Conversation
| // if we are in mix environment, such as Electron, | ||
| // the global.setTimeout has already been patched, | ||
| // so we just patch timers.setTimeout | ||
| return; |
There was a problem hiding this comment.
@JiaLiPassion can you explain how global.setTimeout is patched already? I'm using Zone in mixed environment (Jest with jsdom), and I apparently need global.setTimeout to be patched, so fakeAsync from Angular test utils can work properly. But because it exits early, this line is not reached.
This very line essentially breaks Angular testing with fakeAsync in Jest. We're tracking this under thymikee/jest-preset-angular#65.
Any help appreciated.
|
@thymikee , I will check your repo, in |
|
@JiaLiPassion thank you for the answer! I was using |
node_timernamefsandeventsof nodejs withZone.__load_patchfunctionrollup-main, so we have a clear structure.