Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot display cascade folders in coverage report when using "collectCoverageFrom" config #5820

Closed
marswong opened this issue Mar 17, 2018 · 7 comments

Comments

@marswong
Copy link

Do you want to request a feature or report a bug?
bug
What is the current behavior?
the coverage report table should display cascade folders(here is controllers) but it didn't:

screen shot 2018-03-17 at 22 04 57

If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install and yarn test.

just add a config to collect report from some files:

"jest": {
    "collectCoverageFrom": [
      "controllers/**/*.js",
      "middlewares/**/*.js",
      "services/**/*.js",
      "utils/**/*.js"
    ]
  },

What is the expected behavior?
it should display cascade folders just like the result without config:

screen shot 2018-03-17 at 22 00 44

Please provide your exact Jest configuration
in package.json:

"jest": {
    "bail": true,
    "collectCoverageFrom": [
      "controllers/**/*.js",
      "middlewares/**/*.js",
      "services/**/*.js",
      "utils/**/*.js"
    ]
  },

Run npx envinfo --preset jest in your project directory and paste the
results here

System:
    OS: macOS High Sierra 10.13.3
    CPU: x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
  Binaries:
    Node: 8.10.0
    Yarn: Not Found
    npm: 5.7.1
  npmPackages:
    jest:
      wanted: ^22.4.2
      installed: 22.4.2
@thymikee
Copy link
Collaborator

Can you provide a repo with a repro so we can investigate?

@marswong
Copy link
Author

@thymikee here is the reproduced repo, and the problem might be caused by the collectCoverageFrom config.

@thymikee
Copy link
Collaborator

Does it happen on jest@beta? There have been 2 PRs regarding collectCoverageFrom merged recently: #5601 and #5914 (not sure if included in this tag though)

@marswong
Copy link
Author

jest@23.0.0-alpha.6r performs the same

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants