fix(spec): fakeAsyncTestSpec should handle requestAnimationFrame#805
fix(spec): fakeAsyncTestSpec should handle requestAnimationFrame#805mhevery merged 1 commit intoangular:masterfrom
Conversation
| break; | ||
| default: | ||
| task = delegate.scheduleTask(target, task); | ||
| throw new Error('Unknown macroTask scheduled in fake async test: ' + task.source); |
There was a problem hiding this comment.
Could you mention this fix in the commit description as well?
There was a problem hiding this comment.
@vikerman , @juliemr, I have one question that if we throw Error, unknown macroTask will not be able to be run in fakeAsyncZone, currently beside setTimeout/Interval and requestAnimationFrame, other zone patched macroTasks include setImmediate and nodejs fs/crypto methods, should we also make them available in the fakeAsyncTest?
thank you!
There was a problem hiding this comment.
I'd say that we should consider whether it's meaningful to make them available - but in the meantime, throwing an error is much more useful and clearer than silently passing through.
There was a problem hiding this comment.
@juliemr, thank you for reply.
I'd say that we should consider whether it's meaningful to make them available - but in the meantime, throwing an error is much more useful and clearer than silently passing through.
Got it! I agree, if currently we don't need to make those API available, throw error is more making sense.
|
LGTM, @vikerman can you address @JiaLiPassion concern? |
Fixes #804.