@types/jest-image-snapshot 6.2.0 → 6.2.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.
- jest-image-snapshot/LICENSE +0 -0
- jest-image-snapshot/README.md +2 -3
- jest-image-snapshot/index.d.ts +10 -19
- jest-image-snapshot/package.json +11 -11
jest-image-snapshot/LICENSE
CHANGED
|
File without changes
|
jest-image-snapshot/README.md
CHANGED
|
@@ -8,9 +8,8 @@ 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:
|
|
12
|
-
* Dependencies: [@types/jest](https://npmjs.com/package/@types/jest), [@types/pixelmatch](https://npmjs.com/package/@types/pixelmatch), [
|
|
13
|
-
* Global values: none
|
|
11
|
+
* Last updated: Wed, 18 Oct 2023 01:17:35 GMT
|
|
12
|
+
* Dependencies: [@types/jest](https://npmjs.com/package/@types/jest), [@types/pixelmatch](https://npmjs.com/package/@types/pixelmatch), [ssim.js](https://npmjs.com/package/ssim.js)
|
|
14
13
|
|
|
15
14
|
# Credits
|
|
16
15
|
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).
|
jest-image-snapshot/index.d.ts
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
// Type definitions for jest-image-snapshot 6.2
|
|
2
|
-
// Project: https://github.com/americanexpress/jest-image-snapshot#readme
|
|
3
|
-
// Definitions by: Janeene Beeforth <https://github.com/dawnmist>
|
|
4
|
-
// erbridge <https://github.com/erbridge>
|
|
5
|
-
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
6
|
-
// Ayc0 <https://github.com/Ayc0>
|
|
7
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
8
|
-
// Minimum TypeScript Version: 4.3
|
|
9
|
-
|
|
10
1
|
/// <reference types="jest" />
|
|
11
2
|
|
|
12
|
-
import { PixelmatchOptions } from
|
|
13
|
-
import { Options as SSIMOptions } from
|
|
3
|
+
import { PixelmatchOptions } from "pixelmatch";
|
|
4
|
+
import { Options as SSIMOptions } from "ssim.js";
|
|
14
5
|
|
|
15
6
|
export interface MatchImageSnapshotOptions {
|
|
16
7
|
/**
|
|
@@ -27,7 +18,7 @@ export interface MatchImageSnapshotOptions {
|
|
|
27
18
|
* `pixelmatch` does a pixel by pixel comparison, whereas `ssim` does a structural similarity comparison.
|
|
28
19
|
* @default 'pixelmatch'
|
|
29
20
|
*/
|
|
30
|
-
comparisonMethod?:
|
|
21
|
+
comparisonMethod?: "pixelmatch" | "ssim" | undefined;
|
|
31
22
|
/**
|
|
32
23
|
* Custom snapshots directory.
|
|
33
24
|
* Absolute path of a directory to keep the snapshot in.
|
|
@@ -59,18 +50,18 @@ export interface MatchImageSnapshotOptions {
|
|
|
59
50
|
*/
|
|
60
51
|
customSnapshotIdentifier?:
|
|
61
52
|
| ((parameters: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
testPath: string;
|
|
54
|
+
currentTestName: string;
|
|
55
|
+
counter: number;
|
|
56
|
+
defaultIdentifier: string;
|
|
57
|
+
}) => string)
|
|
67
58
|
| string
|
|
68
59
|
| undefined;
|
|
69
60
|
/**
|
|
70
61
|
* Changes diff image layout direction.
|
|
71
62
|
* @default 'horizontal'
|
|
72
63
|
*/
|
|
73
|
-
diffDirection?:
|
|
64
|
+
diffDirection?: "horizontal" | "vertical" | undefined;
|
|
74
65
|
/**
|
|
75
66
|
* Either only include the difference between the baseline and the received image in the diff image, or include
|
|
76
67
|
* the 3 images (following the direction set by `diffDirection`).
|
|
@@ -105,7 +96,7 @@ export interface MatchImageSnapshotOptions {
|
|
|
105
96
|
* Sets the type of threshold that would trigger a failure.
|
|
106
97
|
* @default 'pixel'.
|
|
107
98
|
*/
|
|
108
|
-
failureThresholdType?:
|
|
99
|
+
failureThresholdType?: "pixel" | "percent" | undefined;
|
|
109
100
|
/**
|
|
110
101
|
* Updates a snapshot even if it passed the threshold against the existing one.
|
|
111
102
|
* @default false.
|
jest-image-snapshot/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/jest-image-snapshot",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.2",
|
|
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",
|
|
7
7
|
"contributors": [
|
|
8
8
|
{
|
|
9
9
|
"name": "Janeene Beeforth",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"githubUsername": "dawnmist",
|
|
11
|
+
"url": "https://github.com/dawnmist"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "erbridge",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"githubUsername": "erbridge",
|
|
16
|
+
"url": "https://github.com/erbridge"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "Piotr Błażejewicz",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"githubUsername": "peterblazejewicz",
|
|
21
|
+
"url": "https://github.com/peterblazejewicz"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "Ayc0",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"githubUsername": "Ayc0",
|
|
26
|
+
"url": "https://github.com/Ayc0"
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"main": "",
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
"@types/pixelmatch": "*",
|
|
40
40
|
"ssim.js": "^3.1.1"
|
|
41
41
|
},
|
|
42
|
-
"typesPublisherContentHash": "
|
|
43
|
-
"typeScriptVersion": "4.
|
|
42
|
+
"typesPublisherContentHash": "e62fdd47f945b92483fd59ce642e312f8e0e007181c6eb91d4a6bcffb9eebda7",
|
|
43
|
+
"typeScriptVersion": "4.5"
|
|
44
44
|
}
|