vitest-plugin-vis 3.0.0 → 3.0.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.
- package/esm/config/types.d.ts +5 -0
- package/esm/config/types.d.ts.map +1 -1
- package/esm/presets/manual.js +2 -1
- package/package.json +4 -4
- package/readme.md +2 -2
- package/src/config/types.ts +5 -0
- package/src/presets/manual.ts +2 -1
package/esm/config/types.d.ts
CHANGED
|
@@ -15,6 +15,11 @@ export type VisOptions<M extends ComparisonMethod = 'pixel'> = (M extends 'ssim'
|
|
|
15
15
|
}) & FailureThresholdOptions & ImageSnapshotTimeoutOptions & ImageSnapshotKeyOptions & ImageSnapshotSubjectOptions & {
|
|
16
16
|
/**
|
|
17
17
|
* Loads the `test.setupFiles` of the specified preset.
|
|
18
|
+
*
|
|
19
|
+
* Note: 'enable` is deprecated. Use `manual` for the same effect.
|
|
20
|
+
*
|
|
21
|
+
* @default 'auto'
|
|
22
|
+
*
|
|
18
23
|
*/
|
|
19
24
|
preset?: 'enable' | 'manual' | 'auto' | 'none' | undefined;
|
|
20
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,MAAM,oBAAoB,CAAA;AAE3B,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,eAAe,EAAE,CAAA;AAElH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,gBAAgB,GAAG,OAAO,IAAI,CAAC,CAAC,SAAS,MAAM,GAC7E;IACA,gBAAgB,EAAE,CAAC,CAAA;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CA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AG,SAAS,CAAA;QAChC,YAAY,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,MAAM,CAAA;QAChB,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACxC,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KACvC,KAAK,MAAM,CAAC,GACb,SAAS,CAAA;IACZ;;;;;;;;;;;;;;;OAeG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;CACxE,CAAA"}
|
package/esm/presets/manual.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest-plugin-vis",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Vitest visual testing plugin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"image-snapshot",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@repobuddy/typescript": "^2.1.0",
|
|
84
84
|
"@types/is-ci": "^3.0.4",
|
|
85
85
|
"@types/pngjs": "^6.0.5",
|
|
86
|
-
"@types/react": "^
|
|
86
|
+
"@types/react": "^18.2.65",
|
|
87
87
|
"@vitest/browser": "^3.0.9",
|
|
88
88
|
"@vitest/coverage-istanbul": "^3.0.9",
|
|
89
89
|
"@vitest/coverage-v8": "^3.0.9",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"cross-env": "^7.0.3",
|
|
92
92
|
"never-fail": "^1.1.4",
|
|
93
93
|
"npm-run-all2": "^8.0.0",
|
|
94
|
-
"react": "^
|
|
95
|
-
"react-dom": "^
|
|
94
|
+
"react": "^18.2.0",
|
|
95
|
+
"react-dom": "^18.2.0",
|
|
96
96
|
"typescript": "^5.7.2",
|
|
97
97
|
"vite": "^6.2.3",
|
|
98
98
|
"vitest": "^3.0.9",
|
package/readme.md
CHANGED
|
@@ -116,12 +116,12 @@ vis.setup({
|
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
As seen in the example above,
|
|
119
|
-
you can configure the `auto`
|
|
119
|
+
you can configure the `auto` snapshot strategy to:
|
|
120
120
|
|
|
121
121
|
- Enable/disable auto snapshot for all tests with `auto: true/false`,
|
|
122
122
|
- Perform some actions before the snapshot is taken,
|
|
123
123
|
- Skip certain snapshots for specific tests by returning `false` in the function,
|
|
124
|
-
- Take snapshots for different themes by providing an object.
|
|
124
|
+
- Take snapshots for different themes or scenarios by providing an object.
|
|
125
125
|
|
|
126
126
|
### Customizing snapshot path
|
|
127
127
|
|
package/src/config/types.ts
CHANGED
|
@@ -33,6 +33,11 @@ export type VisOptions<M extends ComparisonMethod = 'pixel'> = (M extends 'ssim'
|
|
|
33
33
|
ImageSnapshotSubjectOptions & {
|
|
34
34
|
/**
|
|
35
35
|
* Loads the `test.setupFiles` of the specified preset.
|
|
36
|
+
*
|
|
37
|
+
* Note: 'enable` is deprecated. Use `manual` for the same effect.
|
|
38
|
+
*
|
|
39
|
+
* @default 'auto'
|
|
40
|
+
*
|
|
36
41
|
*/
|
|
37
42
|
preset?: 'enable' | 'manual' | 'auto' | 'none' | undefined
|
|
38
43
|
/**
|
package/src/presets/manual.ts
CHANGED