TrialAndErrorOrg / parsers

Monorepo for a suite of `unified`-compatible converters for converting between, from, and to .docx, JATS XML, LaTeX, and PDF
https://convert.centeroftrialanderror.com
GNU General Public License v3.0
15 stars 0 forks source link

Update to latest Jest snapshotFormat #88

Open github-actions[bot] opened 1 year ago

github-actions[bot] commented 1 year ago

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

https://github.com/TrialAndErrorOrg/parsers/blob/1edd8167193816d2b5f0dbc98492dd3355cfa877/jest.preset.js#L35


  moduleNameMapper: pathsToModuleNameMapper(paths, {
    prefix: `${__dirname}/`,
  }),
  /* 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 },
}

cb6c2d74e5f06489161b709ea7f755cc60c8b844