@nx/jest:migrations | Nx

Migration References

Here is a list of all migrations available for this package.

  • 21.0.x

  • remove-tsconfig-option-from-jest-executor

    Remove the previously deprecated and unused `tsConfig` option from the `@nx/jest:jest` executor.

    Version: 21.0.0-beta.10

    Remove tsConfig Option from Jest Executor

    Removes the previously deprecated and unused tsConfig option from the @nx/jest:jest executor configuration in all projects.

    Examples

    Remove the option from the project configuration:

    apps/myapp/project.json
    1{ 2 "targets": { 3 "test": { 4 "executor": "@nx/jest:jest", 5 "options": { 6 "jestConfig": "apps/myapp/jest.config.ts", 7 "tsConfig": "apps/myapp/tsconfig.spec.json" 8 } 9 } 10 } 11} 12

    Remove the option from a target default using the @nx/jest:jest executor:

    nx.json
    1{ 2 "targetDefaults": { 3 "test": { 4 "executor": "@nx/jest:jest", 5 "options": { 6 "jestConfig": "{projectRoot}/jest.config.ts", 7 "tsConfig": "{projectRoot}/tsconfig.spec.json" 8 } 9 } 10 } 11} 12

    Remove the option from a target default using the @nx/jest:jest executor as the key:

    nx.json
    1{ 2 "targetDefaults": { 3 "@nx/jest:jest": { 4 "options": { 5 "jestConfig": "{projectRoot}/jest.config.ts", 6 "tsConfig": "{projectRoot}/tsconfig.spec.json" 7 } 8 } 9 } 10} 11

    replace-getJestProjects-with-getJestProjectsAsync-v21

    Replace usage of `getJestProjects` with `getJestProjectsAsync`.

    Version: 21.0.0-beta.9

    Replace Usage of getJestProjects with getJestProjectsAsync

    Replaces the usage of the removed getJestProjects function with the getJestProjectsAsync function.

    Sample Code Changes

    jest.config.ts
    1import { getJestProjects } from '@nx/jest'; 2 3export default { 4 projects: getJestProjects(), 5}; 6
  • 20.0.x

  • replace-getJestProjects-with-getJestProjectsAsync

    Replace usage of `getJestProjects` with `getJestProjectsAsync`.

    Version: 20.0.0-beta.5

    Replace Usage of getJestProjects with getJestProjectsAsync

    Replaces the usage of the deprecated getJestProjects function with the getJestProjectsAsync function.

    Sample Code Changes

    jest.config.ts
    1import { getJestProjects } from '@nx/jest'; 2 3export default { 4 projects: getJestProjects(), 5}; 6
  • 19.6.x

  • 19.6.0-package-updates

    Version: 19.6.0-beta.1

    Packages

    NameVersionAlways Add to package.json
    jest~29.7.0Update only
    @types/jest~29.5.12Update only
    expect~29.7.0Update only
    @jest/globals~29.7.0Update only
    jest-jasmine2~29.7.0Update only
    jest-environment-jsdom~29.7.0Update only
    babel-jest~29.7.0Update only
  • 19.2.x

  • 19.2.0-package-updates

    Version: 19.2.0-beta.0

    Packages

    NameVersionAlways Add to package.json
    @swc/jest~0.2.36Update only