const nxPreset = require('@nrwl/jest/preset').default; process.env.npm_config_registry = `http://localhost:4872`; process.env.YARN_REGISTRY = `http://localhost:4872`; module.exports = { ...nxPreset, testTimeout: 30000, testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'], transform: { '^.+\\.(ts|js|html)$': 'ts-jest', }, resolver: '../../scripts/patched-jest-resolver.js', moduleFileExtensions: ['ts', 'js', 'html'], coverageReporters: ['html'], maxWorkers: 1, /* 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,run-e2e-tests,xtest --update-snapshot" * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format */ snapshotFormat: { escapeString: true, printBasicPrototype: true }, };