You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run cypress test on a page that has some action with debounceTime
and I need to call cy.clock in beforeEach, the observable never will emit
The test worked perfectly with v6 it broke only after the update for the v7
I see in the changelog that were made changes in debounceTime
The debounceTime implementation is more efficient and no longer schedules an action for each received next notification. However, because the implementation now uses the scheduler's concept of time, any tests using Jasmine's clock will need to ensure that jasmine.clock().mockDate() is called after jasmine.clock().install() - because Jasmine does not mock Date.now() by default.
But I still don't understand why it breaks and I still can't fix it, tests works normally when I remove debounceTime or the clock from the test but it doesn't work with both
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When I try to run cypress test on a page that has some action with
debounceTime
and I need to call
cy.clock
in beforeEach, the observable never will emitThe test worked perfectly with v6 it broke only after the update for the v7
Example
In cypress when I use:
and call:
it will never run because the Observable has:
Additional Details
I see in the changelog that were made changes in
debounceTime
But I still don't understand why it breaks and I still can't fix it, tests works normally when I remove
debounceTime
or theclock
from the test but it doesn't work with bothBeta Was this translation helpful? Give feedback.
All reactions