@jsenv/snapshot 1.5.4 → 1.5.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.
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@jsenv/snapshot",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
4
4
  "description": "Snapshot testing",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "dmail",
8
- "email": "dmaillard06@gmail.com",
9
- "url": "https://twitter.com/damienmaillard"
8
+ "email": "dmaillard06@gmail.com"
10
9
  },
11
10
  "repository": {
12
11
  "type": "git",
@@ -35,9 +34,9 @@
35
34
  "test": "node --conditions=development ./scripts/test.mjs"
36
35
  },
37
36
  "dependencies": {
38
- "@jsenv/assert": "4.1.3",
39
- "@jsenv/filesystem": "4.7.5",
40
- "@jsenv/urls": "2.2.10",
37
+ "@jsenv/assert": "4.1.4",
38
+ "@jsenv/filesystem": "4.8.0",
39
+ "@jsenv/urls": "2.2.11",
41
40
  "@jsenv/utils": "2.1.1",
42
41
  "pixelmatch": "6.0.0",
43
42
  "prettier": "3.3.2"
@@ -290,12 +290,16 @@ ${extraUrls.join("\n")}`);
290
290
  }
291
291
  // content
292
292
  {
293
- for (const relativeUrl of nextRelativeUrls) {
293
+ for (const relativeUrl of relativeUrls) {
294
294
  const snapshot = directoryContentSnapshot[relativeUrl];
295
295
  const nextSnapshot = nextDirectoryContentSnapshot[relativeUrl];
296
- snapshot.compare(nextSnapshot, {
297
- throwWhenDiff: relativeUrl.endsWith(".gif") ? false : throwWhenDiff,
298
- });
296
+ if (nextSnapshot) {
297
+ snapshot.compare(nextSnapshot, {
298
+ throwWhenDiff: relativeUrl.endsWith(".gif")
299
+ ? false
300
+ : throwWhenDiff,
301
+ });
302
+ }
299
303
  }
300
304
  }
301
305
  },