This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 408
messed up args in setInterval / setTimeout in fakeAsyncZones #1032
Comments
@e-hein , thank you for posting the issue, this is a known issue, I will fix it. |
spec:
fix:
|
@e-hein , thank you for the fix and the spec. |
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Feb 27, 2018
mhevery
pushed a commit
that referenced
this issue
Feb 27, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
zone.js/lib/zone-spec/fake-async-test.ts
Line 417 in e1df4bc
The genuine args-Array in a setInterval or setTimeout call contains the function to be called and the delay. The arguments for the function start at the third position. By passing the arguments like this, the function invoked will get an array as argument that contains the function itself and the delay and the expected needed arguments.
Sample:
setInterval((name) => console.log('my name:', name), 100, 'Emanuel')
expected call:
('Emanuel') => console.log('my name:', 'Emanuel')
actual call:
([function, 100, 'Emanuel') => console.log('my name:', [function, 100, 'Emanuel'])
The text was updated successfully, but these errors were encountered: