Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTimeout only passing single parameter to target function #3592

Closed
TheSench opened this Issue Feb 26, 2019 · 2 comments

Comments

2 participants
@TheSench
Copy link
Contributor

TheSench commented Feb 26, 2019

Current behavior:

When passing multiple parameters to setTimeout/setInterval to be forwarded to the callback function, only the first parameter is actually passed on.

Desired behavior:

All parameters after the delay should be passed in to the callback function given to setTimeout/setInterval.

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval

Steps to reproduce: (app code and test code)

Running the following code in the dev console reproduces the issue:
setTimeout(console.log, 0, 'a', 'b', 'c') // Should write 'a b c' to the console

Versions

Cypress 3.1.5
Windows 10
Chrome 72

@cypress-bot

This comment has been minimized.

Copy link

cypress-bot bot commented Feb 26, 2019

The code for this is done in cypress-io/cypress#3593, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot

This comment has been minimized.

Copy link

cypress-bot bot commented Mar 15, 2019

Released in 3.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.