-
Hi, all I have a two projects in workspaces - one is the suite of tests that can run in parallel and the other one is the suite of the tests that must run in sequential. The only problem is that there is no fileParallelism option in the workspace config so I cannot really set this to work. Previously in vitest ~1.5, the following workspace config worked without a problem - but it seems like after upgrading to v3, the sequential test no long runs in sequence. The only option to make it work is setting the fileParallelism at the root level, but this is not ideal because also makes the parallel tests to run sequentially. export default defineWorkspace([
{
extends: './vitest.base-config.ts',
test: {
name: 'db-e2e',
include: ['test/database/**/*.db.test.ts'],
poolOptions: { threads: { singleThread: true } },
env: {
TEST_DATABASE_PORT: '5455',
},
},
},
{
extends: './vitest.base-config.ts',
test: {
name: 'db-parallel',
include: ['test/database_parallel/**/*.test.ts'],
globalSetup: ['test/global-setup.ts'],
env: {
TEST_DATABASE_PORT: '5454',
},
},
},
]); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Did you miss // vitest.workspace.ts
test: {
name: 'db-e2e',
pool: "threads",
poolOptions: { threads: { singleThread: true } },
...
} I think this could technically work, but this is kind of a workaround to control parallelism per workspace. And you might need to move // vitest.config.ts
test: {
poolOptions: { threads: { singleThread: true } }, |
Beta Was this translation helpful? Give feedback.
Did you miss
pool: "threads"
?I think this could technically work, but this is kind of a workaround to control parallelism per workspace.
And you might need to move
poolOptions
to root: