lo-tp / jestBugDemonstration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is demonstration of a bug described in this jest issue

How to check the bug:

  • git clone https://github.com/lo-tp/jestBugDemonstration.git
  • cd jestBugDemonstration
  • yarn install
  • yarn run test -- --no-cache, this should fail since ts-jest transformer is not capable to transform ES6 code.
  • Edit jest.json and change the transform argument from <rootDir>/node_modules/ts-jest/preprocessor.js to typescript-babel-jest
  • yarn run test, now we our transformer is able to transform ES6 code so we should be able to pass the test. However due to the cache problem what is waiting for us is still a failure.
  • yarn run test -- --no-cache, now every thing is ok since we have disabled the cache feature of jest.

Clearly, something went wrong with the caching mechanism.

About


Languages

Language:TypeScript 100.0%