@tryghost/jest-snapshot 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,13 @@ class SnapshotManageer {
42
42
  let testFile = this.currentTest.filename;
43
43
  const testTitle = this.currentTest.nameTemplate;
44
44
  const snapshotName = this._getNameForSnapshot(testFile, testTitle);
45
- const willUpdate = process.env.SNAPSHOT_UPDATE ? 'all' : 'new';
45
+ const updateSnapshots = (
46
+ process.env.SNAPSHOT_UPDATE
47
+ || process.env.UPDATE_SNAPSHOT
48
+ || process.env.SNAPSHOTS_UPDATE
49
+ || process.env.UPDATE_SNAPSHOTS
50
+ );
51
+ const willUpdate = updateSnapshots ? 'all' : 'new';
46
52
 
47
53
  // Set full path
48
54
  testFile = this._resolveSnapshotFilePath(testFile);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/jest-snapshot",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "repository": "https://github.com/TryGhost/framework/tree/main/packages/jest-snapshot",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -20,14 +20,14 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "c8": "7.11.0",
23
- "mocha": "9.2.1",
23
+ "mocha": "9.2.2",
24
24
  "should": "13.2.3",
25
25
  "sinon": "13.0.1"
26
26
  },
27
27
  "dependencies": {
28
- "@tryghost/errors": "^1.2.5",
28
+ "@tryghost/errors": "^1.2.6",
29
29
  "expect": "^27.5.0",
30
30
  "jest-snapshot": "^27.5.0"
31
31
  },
32
- "gitHead": "d09bf53d3435dd9782cea9c5a7062e07538a2b0b"
32
+ "gitHead": "b71a3cb711cae3a1981e925d29780c9bfaacf3c3"
33
33
  }