Nx: @nrwl/workspace:move doesn't update the root jest.config.js

Created on 11 Nov 2020  路  2Comments  路  Source: nrwl/nx

Current Behavior

The root jest.config.js is __not__ updated when running the move schematic:

module.exports = {
  projects: [
    '<rootDir>/apps/products',
    '<rootDir>/apps/cart',
    '<rootDir>/libs/shared/product/ui',
    '<rootDir>/libs/products/home-page',
    '<rootDir>/libs/cart/cart-page',
    '<rootDir>/libs/shared/cart/state',
    '<rootDir>/libs/shared/product/state',
    '<rootDir>/libs/shared/header',
    '<rootDir>/libs/products/product-detail-page',
  ],
};

Expected Behavior

The root jest.config.js file should be modified accordingly:

module.exports = {
  projects: [
    '<rootDir>/apps/products',
    '<rootDir>/apps/cart',
    '<rootDir>/libs/shared/product/ui',
    '<rootDir>/libs/products/home-page',
    '<rootDir>/libs/cart/cart-page',
    '<rootDir>/libs/shared/cart/state',
    '<rootDir>/libs/shared/product/state',
    '<rootDir>/libs/shared/header-renamed', // <-- this
    '<rootDir>/libs/products/product-detail-page',
  ],
};

IMO this is not a regression, because the root jest.config.js file is only added quite recently.

Steps to Reproduce

On the https://github.com/nrwl/nx-examples repo, run the following:

ng generate @nrwl/workspace:move --destination=shared/header-renamed --projectName=shared-header

This PR contains the changes.

Failure Logs

There is no failure.

Environment

  nx : Not Found
  @nrwl/angular : 10.3.1-beta.1
  @nrwl/cli : 10.3.1-beta.1
  @nrwl/cypress : 10.3.1-beta.1
  @nrwl/eslint-plugin-nx : Not Found
  @nrwl/express : Not Found
  @nrwl/jest : 10.3.1-beta.1
  @nrwl/linter : 10.3.1-beta.1
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : Not Found
  @nrwl/react : 10.3.1-beta.1
  @nrwl/schematics : Not Found
  @nrwl/tao : 10.3.1-beta.1
  @nrwl/web : 10.3.1-beta.1
  @nrwl/workspace : 10.3.1-beta.1
  typescript : 4.0.3
bug

All 2 comments

Seems like a duplicate of #4014

I'll close this one so the duplicate can be fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vimalraj-a picture vimalraj-a  路  3Comments

SWGeekPD picture SWGeekPD  路  3Comments

Svancara picture Svancara  路  3Comments

danieldanielecki picture danieldanielecki  路  3Comments

jasedwards picture jasedwards  路  3Comments