Skip to content

Parallelism options don't work when run in workspace mode. #5933

@niba

Description

@niba

Describe the bug

I have monorepo and in one of my packages I have this configuration vitest.config.integration.ts

export default defineConfig({
  test: {
    environment: "node",
    name: `${packageJson.name}_integration`,
    ... some more options
    sequence: {
      hooks: 'list',
    },
    maxWorkers: 1,
    minWorkers: 1,
    fileParallelism: false,
    maxConcurrency: 1,
  },
  plugins: [swc.vite()],
});

when I run it using vitest from the root of monorepo using vite.workspaces (scan packages/*/vitest.config.integration.ts and also vitest.config.unit.ts) then disabling fileParallelism doesn't work (i'm not sure about other settings).

when I use vitest --config path-to-config then it respects the above options and don't do any parallelism.

Reproduction

Should I prepare reproduction for this case?

System Info

System:
    OS: macOS 14.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 51.61 MB / 32.00 GB
    Shell: 3.7.0 - /opt/homebrew/bin/fish
  Binaries:
    Node: 20.10.0 - ~/Library/Caches/fnm_multishells/40574_1718863130062/bin/node
    Yarn: 3.3.1 - /opt/homebrew/bin/yarn
    npm: 10.2.3 - ~/Library/Caches/fnm_multishells/40574_1718863130062/bin/npm
    pnpm: 9.4.0 - ~/Library/pnpm/pnpm
    bun: 1.0.27 - /opt/homebrew/bin/bun
  Browsers:
    Brave Browser: 118.1.59.117
    Edge: 126.0.2592.61
    Safari: 17.3.1
  npmPackages:
    @vitest/ui: 1.6.0 => 1.6.0 
    vitest: 1.6.0 => 1.6.0

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions