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

Rewrite global setup implementation #4174

Closed
4 tasks done
sheremet-va opened this issue Sep 25, 2023 · 0 comments · Fixed by #4213
Closed
4 tasks done

Rewrite global setup implementation #4174

sheremet-va opened this issue Sep 25, 2023 · 0 comments · Fixed by #4213

Comments

@sheremet-va
Copy link
Member

sheremet-va commented Sep 25, 2023

Clear and concise description of the problem

Currently, the global setup is implemented as a Vite plugin which doesn't allow us to skip it when all workspace projects are skipped. This should help fix #3255.

Suggested solution

It would be nice to instead implement global setup calls as methods on a workspace project instance to call it only if there are filtered tests running:

class WorkspaceProject {
  _globalSetupCalled = false
  // called every time we run `runTests` in case new tests are added in watch mode
  initGlobalSetup() {}
  // called inside .close
  teardownGlobalSetup() {}

Alternative

No response

Additional context

No response

Validations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant