angular-builders icon indicating copy to clipboard operation
angular-builders copied to clipboard

Use ts-jest mapper helper to map tsconfig paths to jest paths

Open just-jeb opened this issue 6 years ago • 3 comments
trafficstars

Is your feature request related to a problem? Please describe. Today if the user is using paths in tsconfig.json he has to define the mappings manually in jest.config.js.

Describe the solution you'd like We can save the user the headache by using this approach for mapping tsconfig paths.

just-jeb avatar Jul 25 '19 11:07 just-jeb

As the one who went through this headache there's a few things to bear in mind either way (I lack the experience and knowledge to say either way):

  1. You'll get an error if you implement the ts-jest helper but don't have path in tsconfig.json due to compilerOptions.paths being undefined.
  2. There's still a headache of putting paths in tsconfig.json and having to repeat the custom paths in tsconfig.app.json

AdditionAddict avatar Jul 26 '19 13:07 AdditionAddict

Closing as implemented.

arturovt avatar Dec 22 '22 21:12 arturovt

Whoops, wrongly closed...

arturovt avatar Dec 22 '22 21:12 arturovt