ognen Github contribution chart
ognen Github Stats
ognen Most Used Languages

Activity

17 Aug 2022

Create Branch

Ognen

Demonstrates the bux in nx where ts-node is not activated for a local plugin when it resolves via node

On 17 Aug 2022 at 11:00:01

Ognen

Demonstrates the bux in nx where ts-node is not activated for a local plugin when it resolves via node

On 17 Aug 2022 at 10:51:15
Issue Comment
Ognen Issue Comment nrwl/nx

Ognen

Support jest.config.ts

If you changed your global jest.config.js to jest.config.ts, the library generators, e.g. @nrwl/angular:lib will generate a jest.config.js file in root and ignore the jest.config.ts

Current Behavior

A new /jest.config.js is generated and the lib/jest.config.js references that root jest.config.js

Expected Behavior

I'd expect the no new jest.config.js in the root, and the jest.config.js file in the library to reference the jest.config.ts, maybe even generate a jest.config.ts instead.

Steps to Reproduce

  1. Use jest in your nx workspace
  2. Rename /jest.config.js to /jest.config.ts
  3. Adjust the config to typescript
  4. Change all references to jest.config.js to jest.config.ts
  5. Add a new lib with a generator, e.g. @nrwl/angular:lib using jest as testing runner

Forked On 15 Aug 2022 at 03:10:08

Ognen

I'm not sure that just renaming the jest config to .ts is the proper way to solve this issue. Nx claims it can be used w/o TypeScript (and we do).

It's one think to have a global typescript config file that nx maintains and no-one in the teams touches -- it is a wrinkle but okey.

It's completely different to force TS with jest config files that are used and maintained by the teams. Might be a small thing for someone using TS but it brings a new world to people not using it -- new language, new toolset, new gotchas etc...

Commented On 15 Aug 2022 at 03:10:08