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

chore: repro --no-threads issues #1060

Merged
merged 3 commits into from May 8, 2022

Conversation

cexbrayat
Copy link
Contributor

Adds an additional step to the CI job to reproduce the --no-threads issues

@netlify
Copy link

netlify bot commented Mar 31, 2022

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 8e29fd3
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/6277615ae1eb610008787649
😎 Deploy Preview https://deploy-preview-1060--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.

@antfu
Copy link
Member

antfu commented Mar 31, 2022

Can you share more context about this? Not all tests are capable of running in the same thread.

@cexbrayat
Copy link
Contributor Author

There are currently several issues when running tests with --no-threads:

  • jsdom issues: it turns out that the teardown function of the jdsom env is never called in threaded mode. When threads are disabled, then the teardown function is called, and tests break
  • some mocks and spies tests are failing as well, maybe for a similar reason (pnpm test -- --no-threads)

@cexbrayat
Copy link
Contributor Author

@antfu Just saw your comment. There is at least one issue with jsdom (and happy-dom probably) env: their teardown function is never called when threads are enabled if I'm not mistaken. That leads to behavior difference between threaded and non-threaded mode.

@cexbrayat
Copy link
Contributor Author

Related issue #835

@antfu antfu merged commit 07eeb28 into vitest-dev:main May 8, 2022
chaii3 pushed a commit to chaii3/vitest that referenced this pull request May 13, 2022
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.

None yet

3 participants