Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest Jest snapshotFormat #138

Open
github-actions bot opened this issue May 8, 2023 · 0 comments
Open

Update to latest Jest snapshotFormat #138

github-actions bot opened this issue May 8, 2023 · 0 comments
Labels

Comments

@github-actions
Copy link

github-actions bot commented May 8, 2023

Update to latest Jest snapshotFormat

By default Nx has kept the older style of Jest Snapshot formats

to prevent breaking of any existing tests with snapshots.

It's recommend you update to the latest format.

You can do this by removing snapshotFormat property

and running tests with --update-snapshot flag.

Example: "nx affected --targets=test --update-snapshot"

More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format

/* TODO: Update to latest Jest snapshotFormat

const nxPreset = require('@nx/jest/preset').default;

module.exports = {
  ...nxPreset,
  /* TODO: Update to latest Jest snapshotFormat
   * By default Nx has kept the older style of Jest Snapshot formats
   * to prevent breaking of any existing tests with snapshots.
   * It's recommend you update to the latest format.
   * You can do this by removing snapshotFormat property
   * and running tests with --update-snapshot flag.
   * Example: "nx affected --targets=test --update-snapshot"
   * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
   */
  snapshotFormat: { escapeString: true, printBasicPrototype: true },
};

ae1ae6d77780cf58872a8e480fc43bb3cefcc4d2

@github-actions github-actions bot added the todo label May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants