Skip to content

Coverage not created in Monorepo #394

Closed
@spence-novata

Description

Describe the bug

I don't believe this is a duplicate or regression of #372

When running in a monorepo I'm not getting any coverage reports. If I open vscode on the individual package I get coverage fine. But in a monorepo nothing.

The test itself seems to pass (or fail) correctly. There are no errors in the Output. I pulled the path to the reportsDirectory from the output and that directory doesn't exist.

Reproduction

https://github.com/spence-novata/vitest-monorepo-coverage-repro

Output

[Worker] Running coverage with configuration: {
  provider: 'v8',
  enabled: false,
  all: false,
  clean: true,
  cleanOnRerun: true,
  reportsDirectory: '/var/folders/20/6348r3fs213djqtyzz7f3npm0000gn/T/vitest-coverage-a07c9b9c-d99c-4aa7-bac5-e49fa13c9f40',
  exclude: [
    'coverage/**',
    'dist/**',
    '**/[.]**',
    'packages/*/test?(s)/**',
    '**/*.d.ts',
    '**/virtual:*',
    '**/__x00__*',
    '**/\x00*',
    'cypress/**',
    'test?(s)/**',
    'test?(-*).?(c|m)[jt]s?(x)',
    '**/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)',
    '**/__tests__/**',
    '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
    '**/vitest.{workspace,projects}.[jt]s?(on)',
    '**/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}',
    'vitest.setup.ts',
    'vitest.setup.ts',
    'vitest.setup.ts'
  ],
  reportOnFailure: true,
  reporter: [ [ 'json', {} ] ],
  extension: [
    '.js',    '.cjs',
    '.mjs',   '.ts',
    '.mts',   '.cts',
    '.tsx',   '.jsx',
    '.vue',   '.svelte',
    '.marko'
  ],
  allowExternal: false,
  ignoreEmptyLines: false,
  processingConcurrency: 10
}
[INFO 7:50:27 AM] Running 1 file(s): packages

Version

0.10.7

Validations

Metadata

Assignees

No one assigned

    Labels

    p3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions