Skip to content

test(replay): Update replay tests to handle side effects explicitly #16135

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

Merged
merged 3 commits into from
Apr 25, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Apr 25, 2025

Extracted out of #16134

During that refactor, a bunch of stuff failed. The reason for this is that we relied on a side-effect mock in use-fake-timers utility, which is really not ideal at all.

So this refactors this to instead make this explicit, as a side-effect import on the top of the test files. Then we can just use vi.useFakeTimers() normally.

@mydea mydea requested review from billyvg and chargome April 25, 2025 09:52
@mydea mydea self-assigned this Apr 25, 2025
@mydea mydea requested a review from a team as a code owner April 25, 2025 09:52
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks!

@mydea mydea merged commit 7376508 into develop Apr 25, 2025
123 checks passed
@mydea mydea deleted the fn/replay-test-mock branch April 25, 2025 11:13
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

Successfully merging this pull request may close these issues.

2 participants