Nutella with Pepperoni and Mushrooms
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

jest-module-name-mapper

0.1.5 • Public • Published

Jest Module Name Mapper

License npm version Build Status codecov

Use this to avoid the declaration of the same module path aliases in tsconfig.json and jest.config.js.
The package allows synchronizing Jest path aliases (moduleNameMapper) with your tsconfig.json configuration.

Installation

npm i jest-module-name-mapper -D

Usage

Set configuration in jest.config.js:

module.exports = {
  ...
  moduleNameMapper: require('jest-module-name-mapper')(),
};

If your tsconfig.json file is located in other directory then root, then you can set your own path to the file.

module.exports = {
  ...
  moduleNameMapper: require('jest-module-name-mapper')('/src/tsconfig.json'),
};

Author

Sebastian Musiał

kontakt@sebastianmusial.pl

@sebamusial

Install

npm i jest-module-name-mapper

DownloadsWeekly Downloads

1,212

Version

0.1.5

License

MIT

Unpacked Size

16.8 kB

Total Files

20

Last publish

Collaborators

  • avatar