@altano/vitest-plugins 1.1.3 → 2.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/package.json +10 -10
- package/src/matchers/types.d.ts +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@altano/vitest-plugins",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Custom matchers and snapshot serializers to enhance vitest",
|
|
5
5
|
"homepage": "https://github.com/altano/npm-packages/tree/main/packages/vitest-plugins",
|
|
6
6
|
"repository": {
|
|
@@ -32,24 +32,24 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@prettier/sync": "^0.6.1",
|
|
34
34
|
"exifr": "^7.1.3",
|
|
35
|
-
"serialize-error": "^13.0
|
|
35
|
+
"serialize-error": "^13.1.0",
|
|
36
36
|
"vfile": "^6.0.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^26.
|
|
40
|
-
"@vitest/coverage-v8": "^
|
|
41
|
-
"@vitest/expect": "^
|
|
39
|
+
"@types/node": "^26.6.6",
|
|
40
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
41
|
+
"@vitest/expect": "^5.1.0",
|
|
42
42
|
"depcheck": "^1.4.7",
|
|
43
|
-
"eslint": "^
|
|
44
|
-
"prettier": "3.9.
|
|
43
|
+
"eslint": "^10.14.0",
|
|
44
|
+
"prettier": "3.9.10",
|
|
45
45
|
"typescript": "^6.0.3",
|
|
46
|
-
"vite": "^8.
|
|
47
|
-
"vitest": "^
|
|
46
|
+
"vite": "^8.3.5",
|
|
47
|
+
"vitest": "^5.1.0",
|
|
48
48
|
"@altano/tsconfig": "0.0.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"prettier": "3.x.x",
|
|
52
|
-
"vitest": "
|
|
52
|
+
"vitest": "5.x.x"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
package/src/matchers/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Have to import these to get declaration merging.
|
|
2
2
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3
|
-
import type {
|
|
3
|
+
import type { Matchers } from "vitest";
|
|
4
4
|
|
|
5
5
|
interface CustomMatchers<R = unknown> {
|
|
6
6
|
/**
|
|
@@ -52,9 +52,10 @@ interface ResponseMatchers<R = unknown> {
|
|
|
52
52
|
toHaveStatus(expectedStatus: number): R;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
56
55
|
declare module "vitest" {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
// Type parameters must match the original declaration exactly, so the
|
|
57
|
+
// unused `T` has to stay.
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
59
|
+
interface Matchers<R extends void | Promise<void>, T>
|
|
60
|
+
extends CustomMatchers<R>, ResponseMatchers<R> {}
|
|
60
61
|
}
|