Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

felipeochoa/jest-sourcemaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jest-sourcemaps

Use Jest with sourcemaps

This package contains a few utilities to add source map support to jest. To use it you must:

  • install: npm install jest-sourcemaps
  • override the test Environment: Add "testEnvironment": "jest-sourcemaps/lib/jsdom-env" or "testEnvironment": "jest-sourcemaps/lib/node-env" to your jest config in your package.json.
  • replace babel-jest: Use the transformer here instead by adding "\\.jsx?$": "jest-sourcemaps/lib/transformer.js" to your jest.transform config.
  • add the source-map-support hook by either setting "setupTestFrameworkScriptFile": "jest-sourcemaps/lib/testEnvSetup.js" in your jest config, or by requiring the module from your existing setup file
  • make babel output sourcemaps: Set "sourceMaps": "both" in your .babelrc
  • disable jest's cache: Run it with --no-cache

About

Use Jest with sourcemaps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published