You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
Possible bug, but more likely this needs clarification in the docs.
What is the current behavior?
It is possible to have Jest cache be in two states when running NODE_ENV=test jest vs NODE_ENV=test jest --coverage --coverageDirectory=coverage. ie the issue described here with babel, was happening in only one case. It was very difficult to determine if this was an issue with babel, jest, or my machine setup since it appeared Jest could run perfectly normal when I used coverage report.
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.
Sorry, I have no idea how I got into that state as I was consistently running the coverage option, went back to check npm test was working, and saw it was broken.
What is the expected behavior?
When running Jest, if there is cached code, it would be the same whether I am running with or without coverage.
Please provide your exact Jest configuration
I am not using any config. Used all defaults, and used package.json to point at a setup file and that's it. Setup file should be unrelated but it's:
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import jestFetch from 'jest-fetch-mock';
configure({ adapter: new Adapter() });
global.fetch = jestFetch;
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) i7-4850HQ CPU @ 2.30GHz
Binaries:
Node: 8.10.0
Yarn: Not Found
npm: 5.7.1
npmPackages:
jest:
wanted: ^22.1.4
installed: 22.4.2
The text was updated successfully, but these errors were encountered:
When running Jest, if there is cached code, it would be the same whether I am running with or without coverage.
That's an expectation that we cannot fulfil - in coverage mode we apply the istanbul plugin which injects coverage tracking code. So the code is different.
Gonna close as this behaves as intended. If this causes an issue, please open up a new issue with some reproduction steps. If you think anything needs to be clarified in the docs, don't hesitate to send a PR 🙂
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.
Do you want to request a feature or report a bug?
Possible bug, but more likely this needs clarification in the docs.
What is the current behavior?
It is possible to have Jest cache be in two states when running
NODE_ENV=test jest
vsNODE_ENV=test jest --coverage --coverageDirectory=coverage
. ie the issue described here with babel, was happening in only one case. It was very difficult to determine if this was an issue with babel, jest, or my machine setup since it appeared Jest could run perfectly normal when I used coverage report.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
andyarn test
.Sorry, I have no idea how I got into that state as I was consistently running the coverage option, went back to check
npm test
was working, and saw it was broken.What is the expected behavior?
When running Jest, if there is cached code, it would be the same whether I am running with or without coverage.
Please provide your exact Jest configuration
I am not using any config. Used all defaults, and used
package.json
to point at a setup file and that's it. Setup file should be unrelated but it's:Run
npx envinfo --preset jest
in your project directory and paste theresults here
The text was updated successfully, but these errors were encountered: