-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Issues with coverage and rewire #8871
Comments
Please provide some instructions in the repro on what's the issue and how to achieve it |
Just try loading a module with |
@tandros-div Hi! I'm running into the same issue unfortunately: |
I doubt we'll add support for |
@JNBourrat I decided to go with AVA. I ended up really liking the way it works and its syntax, including that not writing an assert fails the test. |
@An-dz Thanks, I'll be sure to take a look at it. For my end I ended up using babel-plugin-rewire instead of rewire itself. I was able to use |
@JNBourrat I thought about using babel-rewire but it has many dependencies and I wanted to keep my project slim. @SimenB nyc/istanbul had a similar bug I helped to track down, whenever you guy wish to try to fix this these are the issues: |
Found a temp solution: https://www.grzegorowski.com/jest-tests-with-rewire-plugin |
@cqcmdwym I followed the simple instructions that you linked, but I can't get |
Looks like you haven't configed babel in babel config file? |
Hi guys, i'm trying to use babel-jest and babel-plugin-rewire but i have these errors (a lot of them)
|
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. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
🐛 Bug Report
Hi,
I have a public repo that doesn't produce coverage for file scraper.test.js. File is found in tests directory. I do have another test file that doesn't have any issue.
However, the problematic file is using
rewire
npm module, and I have seen some issues with it lately. I did try to completely remove it, but the problem still persists.To Reproduce
In folder crawler
Run:
jest --coverage --bail --findRelatedTests ./__tests__/scraper.test.js
or:
jest --coverage
Expected behavior
I expect to see coverage report for scraper.js.
Tests run successfully but I there is no coverage data.
Link to repl or repo
Repo - develop branch
envinfo
System:
OS: Linux 5.2 Fedora 30 (Workstation Edition) 30 (Workstation Edition)
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Binaries:
Node: 12.8.1 - /usr/bin/node
npm: 6.11.2 - ~/.npm-packages/bin/npm
npmPackages:
jest: ^24.9.0 => 24.9.0
The text was updated successfully, but these errors were encountered: