question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not generating remapped with jest ^18.1.0

See original GitHub issue

I just updated my project to jest@^18.1.0 and ts-jest@^18.0.0, and suddenly my coverage isn’t creating a remapped directory. This was working fine with jest@^17.0.3 and ts-jest@^17.0.0. The only change has been version updates.

package.json:

"jest": "^18.1.0",
"ts-jest": "^18.0.0",

and my config;

{
  "globals": {
    "__TS_CONFIG__": "./src/client/tsconfig.json"
  },
  "moduleFileExtensions": [
    "ts",
    "tsx",
    "js"
  ],
  "transform": {
    ".(ts|tsx)": "./node_modules/ts-jest/preprocessor.js"
  },
  "testResultsProcessor": "./node_modules/ts-jest/coverageprocessor.js",
  "testRegex": "src/client/.*\\.spec\\.(ts|tsx|js)$",
  "collectCoverage": true,
  "collectCoverageFrom": [
    "src/client/**/*.{js,ts,tsx}",
    "!src/client/index.*",
    "!**/node_modules/**"
  ],
  "coverageReporters": ["text", "html"]
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:25 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
japhar81commented, Mar 17, 2017
2reactions
bumbleblymcommented, Mar 10, 2017

don’t think i can minimze my repro any further.

it has 2 files/tests; running npm run test:series (with the jest -i flag) generates the remapped folder, while npm run test does not.

you can also reproduce the issue by having an empty index.ts, and a.test.ts/b.test.ts containing just:

import '.'
it('', () => {})

, though this might be an unrelated pathological case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

nx test: Jest unit tests are failing to run in any test that ... - GitHub
Current Behavior An NX - Ionic and Vue workspace fails to run tests, many solutions tested and any seems to fix the issue:...
Read more >
React Jest - Test suite failed to run for PNG files even after ...
I'm trying to Unit test my React component which imports another component that contains .png file. Because of this image, my test suits...
Read more >
Troubleshooting - Jest
Troubleshooting. Uh oh, something went wrong? Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why​.
Read more >
Npm package installation error on other partition
that is an NTFS partition, and NTFS is known not to be standard (I don't ... [ '18.1.0', '16.13.1', '17.0.2' ], 156 silly...
Read more >
ts-jest - npm
We are not doing semantic versioning and 23.10 is a re-write, run npm i -D ts-jest@"<23.10.0" to go back to the previous version ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found