Skip to content

feat: support async act v2 #22

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 11 commits into from
Jul 23, 2025
Merged

feat: support async act v2 #22

merged 11 commits into from
Jul 23, 2025

Conversation

cloudkite
Copy link
Contributor

@cloudkite cloudkite commented Jun 25, 2025

made some minor updates to the PR #10

  • merged with latest
  • working suspense test using fake timers
  • updated readme

fixes #9

@cloudkite
Copy link
Contributor Author

cloudkite commented Jul 1, 2025

@sheremet-va let me know if theres any additional work or changes needed to move this forward. I think theres also a way to implement this as a backwards compatible change by returning thenables instead of promises. But not sure its worth it as it would make the API and implementation more complicated

@sheremet-va
Copy link
Member

Can you also prepare PRs updating vitest docs and vitest-browser-examples when this is released?

@cloudkite
Copy link
Contributor Author

Can you also prepare PRs updating vitest docs and vitest-browser-examples when this is released?

Sure happy to do that. Should hopefully have some time free next week

@joshuaellis
Copy link

👋🏼 we're quite keen to use this over at sanity is there a chance to get an experimental release in the meantime that we could test out? we use a lot of suspended components on our dashboard project.

@sheremet-va
Copy link
Member

👋🏼 we're quite keen to use this over at sanity is there a chance to get an experimental release in the meantime that we could test out? we use a lot of suspended components on our dashboard project.

This sounds good to me. We probably can't release the v2 version fully because vitest init will incorrectly produce a sync version until we make the changes there.

@sheremet-va sheremet-va merged commit dd89901 into vitest-dev:main Jul 23, 2025
4 checks passed
@joshuaellis
Copy link

FYI i've just added this to an internal project & the test that was failing now works as expected. I had some issues (that weren't there before) where i needed to await MSW's start function in the beforeAll call but realistically I probably should have done that before and it "just worked" other than that, I can't see any issues at the moment.

I'll open issues for anything I do find though. Thanks again for the beta 👍🏼

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.

Components which suspend do not resolve suspense when tested
4 participants