@tryghost/jest-snapshot 0.5.6 → 0.5.8

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.
@@ -63,7 +63,9 @@ class SnapshotManager {
63
63
 
64
64
  resetRegistryForCurrentTest() {
65
65
  const testTitle = this.currentTest.nameTemplate;
66
- delete this.registry[this.currentTest.filename][testTitle];
66
+ if (this.currentTest.filename in this.registry && testTitle in this.registry[this.currentTest.filename]) {
67
+ delete this.registry[this.currentTest.filename][testTitle];
68
+ }
67
69
  }
68
70
 
69
71
  setCurrentTest(testConfig) {
@@ -1,5 +1,5 @@
1
1
  const {jestExpect} = require('@jest/expect');
2
- const SnapshotManager = require('./snapshot-manager');
2
+ const SnapshotManager = require('./SnapshotManager');
3
3
  const snapshotManager = new SnapshotManager();
4
4
 
5
5
  function matchSnapshotAssertion(properties) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/jest-snapshot",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "repository": "https://github.com/TryGhost/framework/tree/main/packages/jest-snapshot",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -19,16 +19,16 @@
19
19
  "access": "public"
20
20
  },
21
21
  "devDependencies": {
22
- "c8": "7.13.0",
22
+ "c8": "8.0.1",
23
23
  "mocha": "10.2.0",
24
24
  "should": "13.2.3",
25
- "sinon": "15.0.4"
25
+ "sinon": "17.0.1"
26
26
  },
27
27
  "dependencies": {
28
28
  "@jest/expect": "^28.0.1",
29
29
  "@jest/expect-utils": "^28.0.1",
30
- "@tryghost/errors": "^1.2.26",
30
+ "@tryghost/errors": "^1.2.27",
31
31
  "jest-snapshot": "^29.0.0"
32
32
  },
33
- "gitHead": "2330ad6fb69583198fb7ffd1b06fce6e4fcbe4d6"
33
+ "gitHead": "a655bcfba6531944b8fd997bf53ccefb9dcf1685"
34
34
  }