Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 956 Bytes

patching-jest-v26.md

File metadata and controls

9 lines (6 loc) · 956 Bytes

Patching Jest v26

If you are using Jest v26, you might need to patch it in order to load modules with proper server/client environments. Don't do this until you actually encounter issues.

  1. Install patch-package and follow its setup instructions
  2. If using the last version of jest (26.6.3), copy this patches folder to your project root and run npx patch-package or yarn patch-package.
  3. If using jest < v26.6.3 update manually node_modules/jest-runtime/build/index.js file replicating this commit and run npx patch-package jest-runtime or yarn patch-package jest-runtime

If using Yarn v2 you might try the approach described here.