Package Exports
- jsconfig-paths-jest-mapper
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsconfig-paths-jest-mapper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jsconfig-paths-jest-mapper
Use this to load modules whose location is specified in the paths section of
jsconfig.json when using jest.
How to install
yarn add --dev jsconfig-paths-jest-mapperor
npm install --save-dev jsconfig-paths-jest-mapperHow to use
In your jest config add this:
const JsConfigPathsMapper = require('jsconfig-paths-jest-mapper');
module.exports = {
...
moduleNameMapper: new JsConfigPathsMapper(/* { configFileName: "path/to/jsconfig.json" } */);
...
}Options
configFile (string) (default='jsconfig.json')
Allows you to specify where to find the configuration file.
How to test
To run the provided tests:
yarn test