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

fix: don't use global timers #1026

Merged
merged 1 commit into from Mar 25, 2022
Merged

fix: don't use global timers #1026

merged 1 commit into from Mar 25, 2022

Conversation

sheremet-va
Copy link
Member

closes #1022

@netlify
Copy link

netlify bot commented Mar 25, 2022

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 4c0302b
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/623d52b36f44fd000828a485
😎 Deploy Preview https://deploy-preview-1026--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@@ -0,0 +1,4 @@
export const setTimeout = globalThis.setTimeout
Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking about importing them form timers module, but then it would be hard to mock them in browser env, I think

@antfu antfu merged commit 16d65a7 into main Mar 25, 2022
@antfu antfu deleted the sheremet-va/timers-utils branch March 25, 2022 06:58
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.

Console logs not working when timer is used in test
2 participants