@types/jest-image-snapshot 2.12.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.
@@ -5,12 +5,12 @@
5
5
  This package contains type definitions for jest-image-snapshot (https://github.com/americanexpress/jest-image-snapshot#readme).
6
6
 
7
7
  # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-image-snapshot/v2.
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, 20 Oct 2020 07:15:44 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,9 +1,10 @@
1
- // Type definitions for jest-image-snapshot 2.12
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
- // TypeScript Version: 3.8
7
+ // TypeScript Version: 3.1
7
8
 
8
9
  /// <reference types="jest" />
9
10
 
@@ -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,46 +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';
51
65
  /**
52
66
  * Will output base64 string of a diff image to console in case of failed tests (in addition to creating a diff image).
53
67
  * This string can be copy-pasted to a browser address string to preview the diff for a failed test.
68
+ * @default false
54
69
  */
55
70
  dumpDiffToConsole?: boolean;
56
71
  /**
57
72
  * Removes coloring from the console output, useful if storing the results to a file.
58
- * Defaults to false.
73
+ * @default false.
59
74
  */
60
75
  noColors?: boolean;
61
76
  /**
62
77
  * Sets the threshold that would trigger a test failure based on the failureThresholdType selected. This is different
63
78
  * to the customDiffConfig.threshold above - the customDiffConfig.threshold is the per pixel failure threshold, whereas
64
79
  * this is the failure threshold for the entire comparison.
65
- * Defaults to 0.
80
+ * @default 0.
66
81
  */
67
82
  failureThreshold?: number;
68
83
  /**
69
84
  * Sets the type of threshold that would trigger a failure.
70
- * Defaults to 'pixel'.
85
+ * @default 'pixel'.
71
86
  */
72
87
  failureThresholdType?: 'pixel' | 'percent';
73
88
  /**
74
89
  * Updates a snapshot even if it passed the threshold against the existing one.
75
- * Defaults to false.
90
+ * @default false.
76
91
  */
77
92
  updatePassedSnapshot?: boolean;
78
93
  /**
79
94
  * Applies Gaussian Blur on compared images, accepts radius in pixels as value. Useful when you have noise after
80
- * 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
81
96
  * enough to solve that problem.
82
- * Defaults to 0.
97
+ * @default 0.
83
98
  */
84
99
  blur?: number;
85
100
  /**
86
101
  * Runs the diff in process without spawning a child process.
87
- * Defaults to false.
102
+ * @default false.
88
103
  */
89
104
  runInProcess?: boolean;
90
105
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/jest-image-snapshot",
3
- "version": "2.12.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": "f44ef6612b2c559811026725f58e5a307c42cb61b17c3c49855fd2b20447c580",
30
- "typeScriptVersion": "3.8"
34
+ "typesPublisherContentHash": "2a3b66bc3ee82b1dec8b0ca7e6b71d51891a9564cf27712db173c4a8474eb4f7",
35
+ "typeScriptVersion": "3.1"
31
36
  }