-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat!: always run tests inside worker #1278
Conversation
✅ Deploy Preview for vitest-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
} | ||
|
||
if (!ctx.config.isolate && !ctx.config.threads) | ||
await runFiles(files) // single thread with no isolation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think --no-threads
should always run all files in a single worker, otherwise there is no point in --no-threads
. It's literally the same as running --threads
- no alternative. And the name becomes misleading.
I think --isolate
should just not affect --no-threads
. Maybe in the future we might use vm.runInContext
for isolation in --no-threads
.
Breaking Changes
threads: false
now runs all tests in the same worker, instead of the main processisolate
option is now orthogonal tothreads
. By solelythreads: false
, the context will still be destroyed after each run. Combiningthreads: false
andisolate: false
to get the previous behavior ofthreads: false
that context will leak across tests.env
options will now only affect the tests but not the main process'sprocess.env
This PR is for the preparation of supporting multiple projects #256