Skip to content

Conversation

aentwist
Copy link
Contributor

@aentwist aentwist commented Jun 20, 2023

Closes #2074

@netlify
Copy link

netlify bot commented Jun 20, 2023

Deploy Preview for vue-test-utils-docs ready!

Name Link
🔨 Latest commit 400c4ea
🔍 Latest deploy log https://app.netlify.com/sites/vue-test-utils-docs/deploys/6491c58a8a67270008d1f8fc
😎 Deploy Preview https://deploy-preview-2100--vue-test-utils-docs.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.

@aentwist aentwist marked this pull request as draft June 20, 2023 01:58
@aentwist aentwist marked this pull request as ready for review June 20, 2023 02:36

## Mocking Dates and Timers with Vitest

`mount` depends on the system time in some way \[needs clarification\]. For
Copy link
Member

Choose a reason for hiding this comment

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

Do you intend to clarify? If not, we could make this more generic. For example:

"Some edge cases are known to exist when using Vitest and the vi.setSystemTime that can interfere with Vue's scheduler, causing unexpected behaviors. If you are using setSystemTime, make sure you call it before calling mount to avoid any unexpected behavior".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is that better? I'm not clarifying because I don't know anything and don't plan to find out. But you pretty much just clarified. And I paraphrased it.

Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

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

Thanks @aentwist 👍

@cexbrayat cexbrayat merged commit 64a9c1f into vuejs:main Jun 20, 2023
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.

Docs: weird interaction between Vitest vi.setSystemTime and VTU mount
3 participants