@types/jest-image-snapshot 2.11.2 → 3.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.
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -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, 03 Apr 2020 20:57:13 GMT
11
+ * Last updated: Wed, 13 May 2020 18:41:00 GMT
12
12
  * Dependencies: [@types/jest](https://npmjs.com/package/@types/jest)
13
13
  * Global values: none
14
14
 
15
15
  # Credits
16
- These definitions were written by [Janeene Beeforth](https://github.com/dawnmist), and [erbridge](https://github.com/erbridge).
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).
@@ -1,7 +1,8 @@
1
- // Type definitions for jest-image-snapshot 2.11
1
+ // Type definitions for jest-image-snapshot 3.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
+ // Piotr Błażejewicz <https://github.com/peterblazejewicz>
5
6
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7
  // TypeScript Version: 3.1
7
8
 
@@ -11,13 +12,25 @@
11
12
  * Options to be passed to the 'pixelmatch' image diffing function.
12
13
  */
13
14
  export interface PixelmatchOptions {
14
- /** Matching threshold, ranges from 0 to 1. Smaller values make the comparison more sensitive. 0.1 by default. */
15
+ /**
16
+ * Matching threshold, ranges from 0 to 1.
17
+ * Smaller values make the comparison more sensitive.
18
+ * @default 0.1
19
+ */
15
20
  readonly threshold?: number;
16
- /** If true, disables detecting and ignoring anti-aliased pixels. false by default. */
21
+ /**
22
+ * If true, disables detecting and ignoring anti-aliased pixels.
23
+ * @default false
24
+ */
17
25
  readonly includeAA?: boolean;
18
26
  }
19
27
 
20
28
  export interface MatchImageSnapshotOptions {
29
+ /**
30
+ * If set to true, the build will not fail when the screenshots to compare have different sizes.
31
+ * @default false
32
+ */
33
+ allowSizeMismatch?: boolean;
21
34
  /**
22
35
  * Custom config passed to 'pixelmatch'
23
36
  */
@@ -45,41 +58,48 @@ export interface MatchImageSnapshotOptions {
45
58
  }) => string)
46
59
  | string;
47
60
  /**
48
- * Changes diff image layout direction, default is horizontal.
61
+ * Changes diff image layout direction.
62
+ * @default 'horizontal'
49
63
  */
50
64
  diffDirection?: 'horizontal' | 'vertical';
65
+ /**
66
+ * Will output base64 string of a diff image to console in case of failed tests (in addition to creating a diff image).
67
+ * This string can be copy-pasted to a browser address string to preview the diff for a failed test.
68
+ * @default false
69
+ */
70
+ dumpDiffToConsole?: boolean;
51
71
  /**
52
72
  * Removes coloring from the console output, useful if storing the results to a file.
53
- * Defaults to false.
73
+ * @default false.
54
74
  */
55
75
  noColors?: boolean;
56
76
  /**
57
77
  * Sets the threshold that would trigger a test failure based on the failureThresholdType selected. This is different
58
78
  * to the customDiffConfig.threshold above - the customDiffConfig.threshold is the per pixel failure threshold, whereas
59
79
  * this is the failure threshold for the entire comparison.
60
- * Defaults to 0.
80
+ * @default 0.
61
81
  */
62
82
  failureThreshold?: number;
63
83
  /**
64
84
  * Sets the type of threshold that would trigger a failure.
65
- * Defaults to 'pixel'.
85
+ * @default 'pixel'.
66
86
  */
67
87
  failureThresholdType?: 'pixel' | 'percent';
68
88
  /**
69
89
  * Updates a snapshot even if it passed the threshold against the existing one.
70
- * Defaults to false.
90
+ * @default false.
71
91
  */
72
92
  updatePassedSnapshot?: boolean;
73
93
  /**
74
94
  * Applies Gaussian Blur on compared images, accepts radius in pixels as value. Useful when you have noise after
75
- * scaling images per different resolutions on your target website, usually setting it's value to 1-2 should be
95
+ * scaling images per different resolutions on your target website, usually setting its value to 1-2 should be
76
96
  * enough to solve that problem.
77
- * Defaults to 0.
97
+ * @default 0.
78
98
  */
79
99
  blur?: number;
80
100
  /**
81
101
  * Runs the diff in process without spawning a child process.
82
- * Defaults to false.
102
+ * @default false.
83
103
  */
84
104
  runInProcess?: boolean;
85
105
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/jest-image-snapshot",
3
- "version": "2.11.2",
3
+ "version": "3.1.0",
4
4
  "description": "TypeScript definitions for jest-image-snapshot",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -13,6 +13,11 @@
13
13
  "name": "erbridge",
14
14
  "url": "https://github.com/erbridge",
15
15
  "githubUsername": "erbridge"
16
+ },
17
+ {
18
+ "name": "Piotr Błażejewicz",
19
+ "url": "https://github.com/peterblazejewicz",
20
+ "githubUsername": "peterblazejewicz"
16
21
  }
17
22
  ],
18
23
  "main": "",
@@ -26,6 +31,6 @@
26
31
  "dependencies": {
27
32
  "@types/jest": "*"
28
33
  },
29
- "typesPublisherContentHash": "f86fc1dd3c68cfbd4fe59d54fe577b4ed5a0e2ea354e2ece1c58af95a6b07f74",
34
+ "typesPublisherContentHash": "2a3b66bc3ee82b1dec8b0ca7e6b71d51891a9564cf27712db173c4a8474eb4f7",
30
35
  "typeScriptVersion": "3.1"
31
36
  }