@types/jest-image-snapshot 6.1.0 → 6.2.1

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: Tue, 06 Dec 2022 19:33:11 GMT
11
+ * Last updated: Fri, 15 Sep 2023 20:36:37 GMT
12
12
  * Dependencies: [@types/jest](https://npmjs.com/package/@types/jest), [@types/pixelmatch](https://npmjs.com/package/@types/pixelmatch), [@types/ssim.js](https://npmjs.com/package/@types/ssim.js)
13
13
  * Global values: none
14
14
 
@@ -1,4 +1,4 @@
1
- // Type definitions for jest-image-snapshot 6.1
1
+ // Type definitions for jest-image-snapshot 6.2
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>
@@ -9,8 +9,8 @@
9
9
 
10
10
  /// <reference types="jest" />
11
11
 
12
- import { PixelmatchOptions } from 'pixelmatch';
13
- import { Options as SSIMOptions } from 'ssim.js';
12
+ import { PixelmatchOptions } from "pixelmatch";
13
+ import { Options as SSIMOptions } from "ssim.js";
14
14
 
15
15
  export interface MatchImageSnapshotOptions {
16
16
  /**
@@ -27,7 +27,7 @@ export interface MatchImageSnapshotOptions {
27
27
  * `pixelmatch` does a pixel by pixel comparison, whereas `ssim` does a structural similarity comparison.
28
28
  * @default 'pixelmatch'
29
29
  */
30
- comparisonMethod?: 'pixelmatch' | 'ssim' | undefined;
30
+ comparisonMethod?: "pixelmatch" | "ssim" | undefined;
31
31
  /**
32
32
  * Custom snapshots directory.
33
33
  * Absolute path of a directory to keep the snapshot in.
@@ -47,6 +47,11 @@ export interface MatchImageSnapshotOptions {
47
47
  * A custom absolute path of a directory to keep this received image in.
48
48
  */
49
49
  customReceivedDir?: string | undefined;
50
+ /**
51
+ * A custom postfix which is added to the snapshot name of the received image
52
+ * @default '-received'
53
+ */
54
+ customReceivedPostfix?: string | undefined;
50
55
  /**
51
56
  * A custom name to give this snapshot. If not provided, one is computed automatically. When a function is provided
52
57
  * it is called with an object containing testPath, currentTestName, counter and defaultIdentifier as its first
@@ -54,18 +59,18 @@ export interface MatchImageSnapshotOptions {
54
59
  */
55
60
  customSnapshotIdentifier?:
56
61
  | ((parameters: {
57
- testPath: string;
58
- currentTestName: string;
59
- counter: number;
60
- defaultIdentifier: string;
61
- }) => string)
62
+ testPath: string;
63
+ currentTestName: string;
64
+ counter: number;
65
+ defaultIdentifier: string;
66
+ }) => string)
62
67
  | string
63
68
  | undefined;
64
69
  /**
65
70
  * Changes diff image layout direction.
66
71
  * @default 'horizontal'
67
72
  */
68
- diffDirection?: 'horizontal' | 'vertical' | undefined;
73
+ diffDirection?: "horizontal" | "vertical" | undefined;
69
74
  /**
70
75
  * Either only include the difference between the baseline and the received image in the diff image, or include
71
76
  * the 3 images (following the direction set by `diffDirection`).
@@ -100,7 +105,7 @@ export interface MatchImageSnapshotOptions {
100
105
  * Sets the type of threshold that would trigger a failure.
101
106
  * @default 'pixel'.
102
107
  */
103
- failureThresholdType?: 'pixel' | 'percent' | undefined;
108
+ failureThresholdType?: "pixel" | "percent" | undefined;
104
109
  /**
105
110
  * Updates a snapshot even if it passed the threshold against the existing one.
106
111
  * @default false.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/jest-image-snapshot",
3
- "version": "6.1.0",
3
+ "version": "6.2.1",
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",
@@ -39,6 +39,6 @@
39
39
  "@types/pixelmatch": "*",
40
40
  "ssim.js": "^3.1.1"
41
41
  },
42
- "typesPublisherContentHash": "3b3eaea9366185a27fcafe2da000bd426b4afce1760e75ecb6568c313b602d09",
43
- "typeScriptVersion": "4.3"
42
+ "typesPublisherContentHash": "72ef1b6e17c6e3d5f353681c9e38cbf9341ea6f5e07db39d96e4c98fbc080298",
43
+ "typeScriptVersion": "4.5"
44
44
  }