🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

jest-module-name-mapper

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-module-name-mapper

Synchronization tsconfig paths with Jest (module name mapper)

0.1.5
latest
Source
npm
Version published
Weekly downloads
7.3K
16.33%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

jest

FAQs

Package last updated on 14 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts