Skip to content

[Vite -> React -> Typescript + SWC] Empty (no, 0, files found) code coverage report #28

@sebaguozden

Description

@sebaguozden

Describe the bug

Everything runs smoothly with pnpm test-storybook. On the other hand, pnpm test-storybook --coverage returns an empty coverage report.

Steps to reproduce the behavior

  1. Run pnpm storybook
  2. Run pnpm test-storybook --coverage
  3. Console Coverage Summary will be empty (no files found)
  4. coverage/storybook/coverage-storybook.json only contains {}

Expected behavior

Show **/*.tsx files on the report.

Screenshots and/or logs

.storybook/main.ts
image

package.json
image

EMPTY Coverage (Console) Report
image

EMPTY Coverage (File) Report
image

Environment

  • OS: Ubuntu 22.04.2 (WSL)
  • Node.js version: v20.9.0
  • PNPM version: 8.10.2 -> Also happens with NPM version: 10.1.0
  • Browser (if applicable): chrome
  • Browser version (if applicable): Not Sure (installed through playwright pnpm exec playwright install + pnpm exec playwright install-deps)
  • Device (if applicable): Not Applicable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions