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

cy.clock and timers, what to do? cy.tick doesn't trigger them #30754

Open
glromeo opened this issue Dec 12, 2024 · 0 comments
Open

cy.clock and timers, what to do? cy.tick doesn't trigger them #30754

glromeo opened this issue Dec 12, 2024 · 0 comments

Comments

@glromeo
Copy link

glromeo commented Dec 12, 2024

Current behavior

cy.clock breaks preact hooks and I see that also requestAnimationFrame doesn't work even if I try to add ticks to my tests it never fires

Desired behavior

a more straightforward or at least better documented way of writing tests where clock is controlled and timers are involved

i.e. tell me how to make preact hooks work!

Test code to reproduce

https://github.com/glromeo/cypress-issue-with-preact-hooks

Cypress Version

latest

Node version

lts

Operating System

windows 11 but others as well

Debug Logs

No response

Other

the repo should help understand the problem I am facing
please look at: cypress/e2e/3-preact/current-time.cy.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant