@types/jest-image-snapshot 4.1.3 → 4.3.2

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.
File without changes
@@ -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: Wed, 04 Nov 2020 02:01:00 GMT
11
+ * Last updated: Fri, 17 Jun 2022 12:01:40 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.8
7
+ // Minimum TypeScript Version: 4.3
8
8
 
9
9
  /// <reference types="jest" />
10
10
  import { PixelmatchOptions } from 'pixelmatch';
@@ -15,26 +15,26 @@ export interface MatchImageSnapshotOptions {
15
15
  * If set to true, the build will not fail when the screenshots to compare have different sizes.
16
16
  * @default false
17
17
  */
18
- allowSizeMismatch?: boolean;
18
+ allowSizeMismatch?: boolean | undefined;
19
19
  /**
20
20
  * Custom config passed to 'pixelmatch' or 'ssim'
21
21
  */
22
- customDiffConfig?: PixelmatchOptions | Partial<SSIMOptions>;
22
+ customDiffConfig?: PixelmatchOptions | Partial<SSIMOptions> | undefined;
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.
26
26
  * @default 'pixelmatch'
27
27
  */
28
- comparisonMethod?: 'pixelmatch' | 'ssim';
28
+ comparisonMethod?: 'pixelmatch' | 'ssim' | undefined;
29
29
  /**
30
30
  * Custom snapshots directory.
31
31
  * Absolute path of a directory to keep the snapshot in.
32
32
  */
33
- customSnapshotsDir?: string;
33
+ customSnapshotsDir?: string | undefined;
34
34
  /**
35
35
  * A custom absolute path of a directory to keep this diff in
36
36
  */
37
- customDiffDir?: string;
37
+ customDiffDir?: string | undefined;
38
38
  /**
39
39
  * A custom name to give this snapshot. If not provided, one is computed automatically. When a function is provided
40
40
  * it is called with an object containing testPath, currentTestName, counter and defaultIdentifier as its first
@@ -47,52 +47,58 @@ export interface MatchImageSnapshotOptions {
47
47
  counter: number;
48
48
  defaultIdentifier: string;
49
49
  }) => string)
50
- | string;
50
+ | string | undefined;
51
51
  /**
52
52
  * Changes diff image layout direction.
53
53
  * @default 'horizontal'
54
54
  */
55
- diffDirection?: 'horizontal' | 'vertical';
55
+ diffDirection?: 'horizontal' | 'vertical' | undefined;
56
56
  /**
57
57
  * Will output base64 string of a diff image to console in case of failed tests (in addition to creating a diff image).
58
58
  * This string can be copy-pasted to a browser address string to preview the diff for a failed test.
59
59
  * @default false
60
60
  */
61
- dumpDiffToConsole?: boolean;
61
+ dumpDiffToConsole?: boolean | undefined;
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 | undefined;
62
68
  /**
63
69
  * Removes coloring from the console output, useful if storing the results to a file.
64
70
  * @default false.
65
71
  */
66
- noColors?: boolean;
72
+ noColors?: boolean | undefined;
67
73
  /**
68
74
  * Sets the threshold that would trigger a test failure based on the failureThresholdType selected. This is different
69
75
  * to the customDiffConfig.threshold above - the customDiffConfig.threshold is the per pixel failure threshold, whereas
70
76
  * this is the failure threshold for the entire comparison.
71
77
  * @default 0.
72
78
  */
73
- failureThreshold?: number;
79
+ failureThreshold?: number | undefined;
74
80
  /**
75
81
  * Sets the type of threshold that would trigger a failure.
76
82
  * @default 'pixel'.
77
83
  */
78
- failureThresholdType?: 'pixel' | 'percent';
84
+ failureThresholdType?: 'pixel' | 'percent' | undefined;
79
85
  /**
80
86
  * Updates a snapshot even if it passed the threshold against the existing one.
81
87
  * @default false.
82
88
  */
83
- updatePassedSnapshot?: boolean;
89
+ updatePassedSnapshot?: boolean | undefined;
84
90
  /**
85
91
  * Applies Gaussian Blur on compared images, accepts radius in pixels as value. Useful when you have noise after
86
92
  * scaling images per different resolutions on your target website, usually setting its value to 1-2 should be
87
93
  * enough to solve that problem.
88
94
  * @default 0.
89
95
  */
90
- blur?: number;
96
+ blur?: number | undefined;
91
97
  /**
92
98
  * Runs the diff in process without spawning a child process.
93
99
  * @default false.
94
100
  */
95
- runInProcess?: boolean;
101
+ runInProcess?: boolean | undefined;
96
102
  }
97
103
 
98
104
  /**
@@ -117,7 +123,10 @@ export function configureToMatchImageSnapshot(
117
123
  /**
118
124
  * Mutates original state with new state
119
125
  */
120
- export function updateSnapshotState<TObject, TPartial>(originalSnapshotState: TObject, partialSnapshotState: TPartial): TObject & TPartial;
126
+ export function updateSnapshotState<TObject, TPartial>(
127
+ originalSnapshotState: TObject,
128
+ partialSnapshotState: TPartial,
129
+ ): TObject & TPartial;
121
130
 
122
131
  declare global {
123
132
  namespace jest {
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@types/jest-image-snapshot",
3
- "version": "4.1.3",
3
+ "version": "4.3.2",
4
4
  "description": "TypeScript definitions for jest-image-snapshot",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-image-snapshot",
5
6
  "license": "MIT",
6
7
  "contributors": [
7
8
  {
@@ -31,8 +32,8 @@
31
32
  "dependencies": {
32
33
  "@types/jest": "*",
33
34
  "@types/pixelmatch": "*",
34
- "ssim.js": "^3.1.0"
35
+ "ssim.js": "^3.1.1"
35
36
  },
36
- "typesPublisherContentHash": "d9d53284f5398ba07643a4df5f5b7ea21c69b9e328df62a5096ef511e12c9133",
37
- "typeScriptVersion": "3.8"
37
+ "typesPublisherContentHash": "277626488fee3bae14a01955a856b857a40a72852b36c48245e8f32312929d6a",
38
+ "typeScriptVersion": "4.3"
38
39
  }