vitest
vitest copied to clipboard
Isolate option doesn't work when run in workspace mode
Describe the bug
I have 2 projects in my workspace, one in isolate mode and not the other, but it appears that both are isolated, as if the isolate
option was not supported in workspaces. I guess it's as intended and an *
is missing from the docs (like https://github.com/vitest-dev/vitest/issues/5933)
Reproduction
import { defineWorkspace } from 'vitest/config'
export default defineWorkspace([
{
extends: './vitest.e2e-config.ts',
test: {
name: 'e2e-isolated',
include: ['**/*.e2e-spec.isolated.ts'],
isolate: true,
},
},
{
extends: './vitest.e2e-config.ts',
test: {
name: 'e2e-shared',
include: ['**/*.e2e-spec.ts'],
isolate: false, // Does not work, tests are still isolated
},
},
])
System Info
System:
OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
Memory: 17.76 GB / 30.95 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.15.1/bin/yarn
npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm
Watchman: 20210821.022905.0 - /usr/local/bin/watchman
Browsers:
Chrome: 127.0.6533.72
Chromium: 126.0.6478.182
npmPackages:
@vitest/coverage-v8: 2.0.3 => 2.0.3
vitest: 2.0.3 => 2.0.3
Used Package Manager
yarn
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.