@unthrown/vitest 1.0.0 → 1.1.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.
- package/docs/index.md +11 -11
- package/package.json +2 -2
package/docs/index.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
type UnthrownMatchers<R> = object;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Defined in: [index.ts:164](https://github.com/btravstack/unthrown/blob/
|
|
15
|
+
Defined in: [index.ts:164](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L164)
|
|
16
16
|
|
|
17
17
|
The matchers `@unthrown/vitest` contributes to Vitest's `expect`. For an
|
|
18
18
|
`AsyncResult`, `await` the assertion; `toBeOkWith` compares deeply.
|
|
@@ -27,11 +27,11 @@ The matchers `@unthrown/vitest` contributes to Vitest's `expect`. For an
|
|
|
27
27
|
|
|
28
28
|
| Property | Type | Description | Defined in |
|
|
29
29
|
| ------ | ------ | ------ | ------ |
|
|
30
|
-
| <a id="tobedefect"></a> `toBeDefect` | () => `R` | - | [index.ts:175](https://github.com/btravstack/unthrown/blob/
|
|
31
|
-
| <a id="tobeerr"></a> `toBeErr` | () => `R` | - | [index.ts:167](https://github.com/btravstack/unthrown/blob/
|
|
32
|
-
| <a id="tobeerrtagged"></a> `toBeErrTagged` | (`tag`, `expected?`) => `R` | Assert an `Err` whose error has `_tag === tag`. Optionally pass `expected` to also match the error's payload (its own props minus `_tag`/`name`): a plain object matches exactly, an asymmetric matcher (e.g. `expect.objectContaining(...)`) matches partially. | [index.ts:174](https://github.com/btravstack/unthrown/blob/
|
|
33
|
-
| <a id="tobeok"></a> `toBeOk` | () => `R` | - | [index.ts:165](https://github.com/btravstack/unthrown/blob/
|
|
34
|
-
| <a id="tobeokwith"></a> `toBeOkWith` | (`value`) => `R` | - | [index.ts:166](https://github.com/btravstack/unthrown/blob/
|
|
30
|
+
| <a id="tobedefect"></a> `toBeDefect` | () => `R` | - | [index.ts:175](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L175) |
|
|
31
|
+
| <a id="tobeerr"></a> `toBeErr` | () => `R` | - | [index.ts:167](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L167) |
|
|
32
|
+
| <a id="tobeerrtagged"></a> `toBeErrTagged` | (`tag`, `expected?`) => `R` | Assert an `Err` whose error has `_tag === tag`. Optionally pass `expected` to also match the error's payload (its own props minus `_tag`/`name`): a plain object matches exactly, an asymmetric matcher (e.g. `expect.objectContaining(...)`) matches partially. | [index.ts:174](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L174) |
|
|
33
|
+
| <a id="tobeok"></a> `toBeOk` | () => `R` | - | [index.ts:165](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L165) |
|
|
34
|
+
| <a id="tobeokwith"></a> `toBeOkWith` | (`value`) => `R` | - | [index.ts:166](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L166) |
|
|
35
35
|
|
|
36
36
|
## Functions
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ The matchers `@unthrown/vitest` contributes to Vitest's `expect`. For an
|
|
|
41
41
|
function toBeDefect(this, received): ExpectationResult;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [index.ts:140](https://github.com/btravstack/unthrown/blob/
|
|
44
|
+
Defined in: [index.ts:140](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L140)
|
|
45
45
|
|
|
46
46
|
#### Parameters
|
|
47
47
|
|
|
@@ -62,7 +62,7 @@ Defined in: [index.ts:140](https://github.com/btravstack/unthrown/blob/fa4c17ddc
|
|
|
62
62
|
function toBeErr(this, received): ExpectationResult;
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
Defined in: [index.ts:100](https://github.com/btravstack/unthrown/blob/
|
|
65
|
+
Defined in: [index.ts:100](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L100)
|
|
66
66
|
|
|
67
67
|
#### Parameters
|
|
68
68
|
|
|
@@ -87,7 +87,7 @@ function toBeErrTagged(
|
|
|
87
87
|
expected?): ExpectationResult;
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Defined in: [index.ts:114](https://github.com/btravstack/unthrown/blob/
|
|
90
|
+
Defined in: [index.ts:114](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L114)
|
|
91
91
|
|
|
92
92
|
#### Parameters
|
|
93
93
|
|
|
@@ -110,7 +110,7 @@ Defined in: [index.ts:114](https://github.com/btravstack/unthrown/blob/fa4c17ddc
|
|
|
110
110
|
function toBeOk(this, received): ExpectationResult;
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
Defined in: [index.ts:71](https://github.com/btravstack/unthrown/blob/
|
|
113
|
+
Defined in: [index.ts:71](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L71)
|
|
114
114
|
|
|
115
115
|
#### Parameters
|
|
116
116
|
|
|
@@ -134,7 +134,7 @@ function toBeOkWith(
|
|
|
134
134
|
expected): ExpectationResult;
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
Defined in: [index.ts:85](https://github.com/btravstack/unthrown/blob/
|
|
137
|
+
Defined in: [index.ts:85](https://github.com/btravstack/unthrown/blob/8424c0f1e5d5b49a3cb6853d52fb8d5085bd4701/packages/vitest/src/index.ts#L85)
|
|
138
138
|
|
|
139
139
|
#### Parameters
|
|
140
140
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unthrown/vitest",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Vitest matchers for unthrown",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"errors-as-values",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"./package.json": "./package.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"unthrown": "1.
|
|
47
|
+
"unthrown": "1.1.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "24.13.2",
|