* Enable the mode that allows updating snapshots when running tests. * This method doesn't run any tests. * * Every test that runs after this method is called will update snapshots. * To disable the mode, call `resetSnapshotUpdate`.
()
| 1321 | * To disable the mode, call `resetSnapshotUpdate`. |
| 1322 | */ |
| 1323 | public enableSnapshotUpdate(): void { |
| 1324 | this.configOverride.snapshotOptions = { |
| 1325 | updateSnapshot: 'all', |
| 1326 | // environment is resolved inside a worker thread |
| 1327 | snapshotEnvironment: null as any, |
| 1328 | } |
| 1329 | this.snapshot.options.updateSnapshot = 'all' |
| 1330 | } |
| 1331 | |
| 1332 | /** |
| 1333 | * Disable the mode that allows updating snapshots when running tests. |