@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.
jest-image-snapshot/README.md
CHANGED
|
@@ -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:
|
|
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
|
|
jest-image-snapshot/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// Type definitions for jest-image-snapshot 4.
|
|
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.
|
|
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> {
|
jest-image-snapshot/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/jest-image-snapshot",
|
|
3
|
-
"version": "4.
|
|
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.
|
|
34
|
+
"ssim.js": "^3.1.1"
|
|
35
35
|
},
|
|
36
|
-
"typesPublisherContentHash": "
|
|
37
|
-
"typeScriptVersion": "3.
|
|
36
|
+
"typesPublisherContentHash": "d027b95b142fe32bf7dde079cdecb9b17580aac643c8d260c7b7cb69ab6a5ecc",
|
|
37
|
+
"typeScriptVersion": "3.8"
|
|
38
38
|
}
|