@types/jest-image-snapshot 4.3.2 → 6.1.0

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.
@@ -8,9 +8,9 @@ This package contains type definitions for jest-image-snapshot (https://github.c
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-image-snapshot.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 17 Jun 2022 12:01:40 GMT
12
- * Dependencies: [@types/pixelmatch](https://npmjs.com/package/@types/pixelmatch), [@types/ssim.js](https://npmjs.com/package/@types/ssim.js), [@types/jest](https://npmjs.com/package/@types/jest)
11
+ * Last updated: Tue, 06 Dec 2022 19:33:11 GMT
12
+ * Dependencies: [@types/jest](https://npmjs.com/package/@types/jest), [@types/pixelmatch](https://npmjs.com/package/@types/pixelmatch), [@types/ssim.js](https://npmjs.com/package/@types/ssim.js)
13
13
  * Global values: none
14
14
 
15
15
  # Credits
16
- These definitions were written by [Janeene Beeforth](https://github.com/dawnmist), [erbridge](https://github.com/erbridge), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
16
+ These definitions were written by [Janeene Beeforth](https://github.com/dawnmist), [erbridge](https://github.com/erbridge), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Ayc0](https://github.com/Ayc0).
@@ -1,12 +1,14 @@
1
- // Type definitions for jest-image-snapshot 4.3
1
+ // Type definitions for jest-image-snapshot 6.1
2
2
  // Project: https://github.com/americanexpress/jest-image-snapshot#readme
3
3
  // Definitions by: Janeene Beeforth <https://github.com/dawnmist>
4
4
  // erbridge <https://github.com/erbridge>
5
5
  // Piotr Błażejewicz <https://github.com/peterblazejewicz>
6
+ // Ayc0 <https://github.com/Ayc0>
6
7
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
8
  // Minimum TypeScript Version: 4.3
8
9
 
9
10
  /// <reference types="jest" />
11
+
10
12
  import { PixelmatchOptions } from 'pixelmatch';
11
13
  import { Options as SSIMOptions } from 'ssim.js';
12
14
 
@@ -35,6 +37,16 @@ export interface MatchImageSnapshotOptions {
35
37
  * A custom absolute path of a directory to keep this diff in
36
38
  */
37
39
  customDiffDir?: string | undefined;
40
+ /**
41
+ * Store the received images separately from the composed diff images on failure.
42
+ * This can be useful when updating baseline images from CI.
43
+ * @default false
44
+ */
45
+ storeReceivedOnFailure?: boolean | undefined;
46
+ /**
47
+ * A custom absolute path of a directory to keep this received image in.
48
+ */
49
+ customReceivedDir?: string | undefined;
38
50
  /**
39
51
  * A custom name to give this snapshot. If not provided, one is computed automatically. When a function is provided
40
52
  * it is called with an object containing testPath, currentTestName, counter and defaultIdentifier as its first
@@ -47,12 +59,19 @@ export interface MatchImageSnapshotOptions {
47
59
  counter: number;
48
60
  defaultIdentifier: string;
49
61
  }) => string)
50
- | string | undefined;
62
+ | string
63
+ | undefined;
51
64
  /**
52
65
  * Changes diff image layout direction.
53
66
  * @default 'horizontal'
54
67
  */
55
68
  diffDirection?: 'horizontal' | 'vertical' | undefined;
69
+ /**
70
+ * Either only include the difference between the baseline and the received image in the diff image, or include
71
+ * the 3 images (following the direction set by `diffDirection`).
72
+ * @default false
73
+ */
74
+ onlyDiff?: boolean | undefined;
56
75
  /**
57
76
  * Will output base64 string of a diff image to console in case of failed tests (in addition to creating a diff image).
58
77
  * This string can be copy-pasted to a browser address string to preview the diff for a failed test.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/jest-image-snapshot",
3
- "version": "4.3.2",
3
+ "version": "6.1.0",
4
4
  "description": "TypeScript definitions for jest-image-snapshot",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-image-snapshot",
6
6
  "license": "MIT",
@@ -19,6 +19,11 @@
19
19
  "name": "Piotr Błażejewicz",
20
20
  "url": "https://github.com/peterblazejewicz",
21
21
  "githubUsername": "peterblazejewicz"
22
+ },
23
+ {
24
+ "name": "Ayc0",
25
+ "url": "https://github.com/Ayc0",
26
+ "githubUsername": "Ayc0"
22
27
  }
23
28
  ],
24
29
  "main": "",
@@ -34,6 +39,6 @@
34
39
  "@types/pixelmatch": "*",
35
40
  "ssim.js": "^3.1.1"
36
41
  },
37
- "typesPublisherContentHash": "277626488fee3bae14a01955a856b857a40a72852b36c48245e8f32312929d6a",
42
+ "typesPublisherContentHash": "3b3eaea9366185a27fcafe2da000bd426b4afce1760e75ecb6568c313b602d09",
38
43
  "typeScriptVersion": "4.3"
39
44
  }