| | |
| | | Object.defineProperty(exports, '__esModule', { |
| | | value: true |
| | | }); |
| | | exports.deepMerge = |
| | | exports.saveSnapshotFile = |
| | | exports.ensureDirectoryExists = |
| | | exports.escapeBacktickString = |
| | | exports.deserializeString = |
| | | exports.minify = |
| | | exports.testNameToKey = |
| | | exports.serialize = |
| | | exports.saveSnapshotFile = |
| | | exports.removeLinesBeforeExternalMatcherTrap = |
| | | exports.removeExtraLineBreaks = |
| | | exports.addExtraLineBreaks = |
| | | exports.getSnapshotData = |
| | | exports.minify = |
| | | exports.keyToTestName = |
| | | exports.testNameToKey = |
| | | exports.getSnapshotData = |
| | | exports.escapeBacktickString = |
| | | exports.ensureDirectoryExists = |
| | | exports.deserializeString = |
| | | exports.deepMerge = |
| | | exports.addExtraLineBreaks = |
| | | exports.SNAPSHOT_VERSION_WARNING = |
| | | exports.SNAPSHOT_GUIDE_LINK = |
| | | exports.SNAPSHOT_VERSION = |
| | | exports.SNAPSHOT_GUIDE_LINK = |
| | | void 0; |
| | | |
| | | var path = _interopRequireWildcard(require('path')); |
| | |
| | | |
| | | const SNAPSHOT_VERSION_WARNING = _chalk.default.yellow( |
| | | `${_chalk.default.bold('Warning')}: Before you upgrade snapshots, ` + |
| | | `we recommend that you revert any local changes to tests or other code, ` + |
| | | `to ensure that you do not store invalid state.` |
| | | 'we recommend that you revert any local changes to tests or other code, ' + |
| | | 'to ensure that you do not store invalid state.' |
| | | ); |
| | | |
| | | exports.SNAPSHOT_VERSION_WARNING = SNAPSHOT_VERSION_WARNING; |
| | |
| | | `${_chalk.default.bold( |
| | | 'Outdated snapshot' |
| | | )}: No snapshot header found. ` + |
| | | `Jest 19 introduced versioned snapshots to ensure all developers ` + |
| | | `on a project are using the same version of Jest. ` + |
| | | `Please update all snapshots during this upgrade of Jest.\n\n` |
| | | 'Jest 19 introduced versioned snapshots to ensure all developers ' + |
| | | 'on a project are using the same version of Jest. ' + |
| | | 'Please update all snapshots during this upgrade of Jest.\n\n' |
| | | ) + SNAPSHOT_VERSION_WARNING |
| | | ); |
| | | } |
| | |
| | | `${_chalk.default.red.bold( |
| | | 'Outdated snapshot' |
| | | )}: The version of the snapshot ` + |
| | | `file associated with this test is outdated. The snapshot file ` + |
| | | `version ensures that all developers on a project are using ` + |
| | | `the same version of Jest. ` + |
| | | `Please update all snapshots during this upgrade of Jest.\n\n` |
| | | 'file associated with this test is outdated. The snapshot file ' + |
| | | 'version ensures that all developers on a project are using ' + |
| | | 'the same version of Jest. ' + |
| | | 'Please update all snapshots during this upgrade of Jest.\n\n' |
| | | ) + |
| | | `Expected: v${SNAPSHOT_VERSION}\n` + |
| | | `Received: v${version}\n\n` + |
| | |
| | | `${_chalk.default.red.bold( |
| | | 'Outdated Jest version' |
| | | )}: The version of this ` + |
| | | `snapshot file indicates that this project is meant to be used ` + |
| | | `with a newer version of Jest. The snapshot file version ensures ` + |
| | | `that all developers on a project are using the same version of ` + |
| | | `Jest. Please update your version of Jest and re-run the tests.\n\n` |
| | | 'snapshot file indicates that this project is meant to be used ' + |
| | | 'with a newer version of Jest. The snapshot file version ensures ' + |
| | | 'that all developers on a project are using the same version of ' + |
| | | 'Jest. Please update your version of Jest and re-run the tests.\n\n' |
| | | ) + |
| | | `Expected: v${SNAPSHOT_VERSION}\n` + |
| | | `Received: v${version}` |