@blazediff/jest 1.1.2 → 1.1.3
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.
- package/package.json +2 -2
- package/dist/index.d.mts +0 -59
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blazediff/jest",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Jest matcher for visual regression testing with blazediff",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"homepage": "https://blazediff.dev",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@blazediff/matcher": "1.2.
|
|
36
|
+
"@blazediff/matcher": "1.2.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/jest": "^29.5.14",
|
package/dist/index.d.mts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { MatcherOptions } from '@blazediff/matcher';
|
|
2
|
-
export { ComparisonResult, ImageInput, MatcherOptions } from '@blazediff/matcher';
|
|
3
|
-
|
|
4
|
-
declare global {
|
|
5
|
-
namespace jest {
|
|
6
|
-
interface Matchers<R> {
|
|
7
|
-
/**
|
|
8
|
-
* Compare an image against a stored snapshot.
|
|
9
|
-
*
|
|
10
|
-
* On first run, creates a new snapshot.
|
|
11
|
-
* On subsequent runs, compares against the stored snapshot.
|
|
12
|
-
*
|
|
13
|
-
* @param options - Matcher options including comparison method and thresholds
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* // Compare file path
|
|
18
|
-
* await expect('/path/to/screenshot.png').toMatchImageSnapshot({
|
|
19
|
-
* method: 'bin',
|
|
20
|
-
* failureThreshold: 100,
|
|
21
|
-
* failureThresholdType: 'pixel',
|
|
22
|
-
* });
|
|
23
|
-
*
|
|
24
|
-
* // Compare image buffer
|
|
25
|
-
* await expect({
|
|
26
|
-
* data: imageBuffer,
|
|
27
|
-
* width: 800,
|
|
28
|
-
* height: 600
|
|
29
|
-
* }).toMatchImageSnapshot({
|
|
30
|
-
* method: 'ssim',
|
|
31
|
-
* failureThreshold: 0.01,
|
|
32
|
-
* failureThresholdType: 'percent',
|
|
33
|
-
* });
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
toMatchImageSnapshot(options?: Partial<MatcherOptions>): Promise<R>;
|
|
37
|
-
}
|
|
38
|
-
interface Expect {
|
|
39
|
-
toMatchImageSnapshot(options?: Partial<MatcherOptions>): void;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Setup blazediff matchers for Jest
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```typescript
|
|
49
|
-
* // In your jest setup file
|
|
50
|
-
* import { setupBlazediffMatchers } from '@blazediff/jest';
|
|
51
|
-
* setupBlazediffMatchers();
|
|
52
|
-
*
|
|
53
|
-
* // Or just import the package (auto-setup)
|
|
54
|
-
* import '@blazediff/jest';
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
declare function setupBlazediffMatchers(): void;
|
|
58
|
-
|
|
59
|
-
export { setupBlazediffMatchers as default, setupBlazediffMatchers };
|