@types/jest-image-snapshot 4.1.0 → 4.3.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,7 +8,7 @@ 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: Tue, 08 Sep 2020 21:01:44 GMT
11
+ * Last updated: Fri, 26 Feb 2021 15:59:06 GMT
12
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)
13
13
  * Global values: none
14
14
 
@@ -1,10 +1,10 @@
1
- // Type definitions for jest-image-snapshot 4.1
1
+ // Type definitions for jest-image-snapshot 4.3
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
6
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
- // TypeScript Version: 3.1
7
+ // TypeScript Version: 3.8
8
8
 
9
9
  /// <reference types="jest" />
10
10
  import { PixelmatchOptions } from 'pixelmatch';
@@ -19,7 +19,7 @@ export interface MatchImageSnapshotOptions {
19
19
  /**
20
20
  * Custom config passed to 'pixelmatch' or 'ssim'
21
21
  */
22
- customDiffConfig?: PixelmatchOptions | SSIMOptions;
22
+ customDiffConfig?: PixelmatchOptions | Partial<SSIMOptions>;
23
23
  /**
24
24
  * The method by which images are compared.
25
25
  * `pixelmatch` does a pixel by pixel comparison, whereas `ssim` does a structural similarity comparison.
@@ -59,6 +59,12 @@ export interface MatchImageSnapshotOptions {
59
59
  * @default false
60
60
  */
61
61
  dumpDiffToConsole?: boolean;
62
+ /**
63
+ * Will output the image to the terminal using iTerm's Inline Images Protocol.
64
+ * If the term is not compatible, it does the same thing as `dumpDiffToConsole`.
65
+ * @default false
66
+ */
67
+ dumpInlineDiffToConsole?: boolean;
62
68
  /**
63
69
  * Removes coloring from the console output, useful if storing the results to a file.
64
70
  * @default false.
@@ -114,6 +120,14 @@ export function configureToMatchImageSnapshot(
114
120
  options: MatchImageSnapshotOptions,
115
121
  ): () => { message(): string; pass: boolean };
116
122
 
123
+ /**
124
+ * Mutates original state with new state
125
+ */
126
+ export function updateSnapshotState<TObject, TPartial>(
127
+ originalSnapshotState: TObject,
128
+ partialSnapshotState: TPartial,
129
+ ): TObject & TPartial;
130
+
117
131
  declare global {
118
132
  namespace jest {
119
133
  interface Matchers<R, T> {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/jest-image-snapshot",
3
- "version": "4.1.0",
3
+ "version": "4.3.0",
4
4
  "description": "TypeScript definitions for jest-image-snapshot",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "@types/jest": "*",
33
33
  "@types/pixelmatch": "*",
34
- "ssim.js": "^3.1.0"
34
+ "ssim.js": "^3.1.1"
35
35
  },
36
- "typesPublisherContentHash": "2aa6255be8d26b500331cf9ae849e30e847b9a343fd34876975645c97a9cf587",
37
- "typeScriptVersion": "3.1"
36
+ "typesPublisherContentHash": "d027b95b142fe32bf7dde079cdecb9b17580aac643c8d260c7b7cb69ab6a5ecc",
37
+ "typeScriptVersion": "3.8"
38
38
  }