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

wrapTimer changes browser's setTimeout behaviour #2719

Closed
karel1980 opened this issue Nov 5, 2018 · 2 comments
Closed

wrapTimer changes browser's setTimeout behaviour #2719

karel1980 opened this issue Nov 5, 2018 · 2 comments
Assignees
Labels
pkg/driver This is due to an issue in the packages/driver directory type: bug

Comments

@karel1980
Copy link

Current behavior:

I have an application which calls setTimeout(undefined, 0). (This itself is not very good, but just for now, consider that this does nothing in Chrome (no errors).

Link to the setTimeout(undefined, 0) call: mdbootstrap/mdb-angular-ui-kit#97

Before cypress 3.1.1 this did not cause any errors. Since 3.1.1 this causes tests to fail in wrapTimer -> invoke (it tries to call 'apply' on the undefined argument).

Desired behavior:

Silently do nothing, just as a user's browser would do.

Steps to reproduce:

Build an application which calls setTimeout(undefined, 0) & run a test with cypress 3.1.1.

Versions

Cypress 3.1.1, reproduced on recent osx and ubuntu versions.
ps cypress 3.1.1 is available on npmjs.com, but not tagged on github? Is that intentional?

@chrisbreiding
Copy link
Contributor

Yeah, I think we only handle a string or a function being passed in. We need to handle other types of values as well.

@chrisbreiding chrisbreiding added the pkg/driver This is due to an issue in the packages/driver directory label Nov 5, 2018
@chrisbreiding chrisbreiding self-assigned this Nov 5, 2018
@brian-mann
Copy link
Member

Released in 3.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg/driver This is due to an issue in the packages/driver directory type: bug
Projects
None yet
Development

No branches or pull requests

4 participants