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

Built-in waitFor and waitUntil #4061

Closed
4 tasks done
sheremet-va opened this issue Sep 2, 2023 · 3 comments · Fixed by #4129
Closed
4 tasks done

Built-in waitFor and waitUntil #4061

sheremet-va opened this issue Sep 2, 2023 · 3 comments · Fixed by #4129
Labels
enhancement New feature or request pr welcome

Comments

@sheremet-va
Copy link
Member

Clear and concise description of the problem

There are situations when it's not obvious when assertion will succeed because there is no way to track it (async operation performed inside a sync one). For this situation, community has come up with different solutions:

Suggested solution

I think it would be nice to provide these kinds of helpers in the core.

Alternative

No response

Additional context

No response

Validations

@sheremet-va sheremet-va added enhancement New feature or request pr welcome labels Sep 2, 2023
@AriPerkkio
Copy link
Member

AriPerkkio commented Sep 2, 2023

This would be really useful. I'm often writing waitFor utility myself when using Vitest in new project.

Might want to look into testing-library/web-testing-library#3 while implementing this.

@Dunqing
Copy link
Member

Dunqing commented Sep 11, 2023

I am interested in this. In which package should I add it?

@sheremet-va
Copy link
Member Author

I am interested in this. In which package should I add it?

It should probably be exposed on vi object.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request pr welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants