@vitest/expect 4.0.10 → 4.0.11
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/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Test } from '@vitest/runner';
|
|
1
2
|
import { MockInstance } from '@vitest/spy';
|
|
2
3
|
import { Constructable } from '@vitest/utils';
|
|
3
4
|
import { Formatter } from 'tinyrainbow';
|
|
@@ -150,6 +151,7 @@ interface MatcherState {
|
|
|
150
151
|
};
|
|
151
152
|
soft?: boolean;
|
|
152
153
|
poll?: boolean;
|
|
154
|
+
task?: Readonly<Test>;
|
|
153
155
|
}
|
|
154
156
|
interface SyncExpectationResult {
|
|
155
157
|
pass: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1768,8 +1768,13 @@ function getMatcherState(assertion, expect) {
|
|
|
1768
1768
|
iterableEquality,
|
|
1769
1769
|
subsetEquality
|
|
1770
1770
|
};
|
|
1771
|
+
let task = util.flag(assertion, "vitest-test");
|
|
1772
|
+
if ((task === null || task === void 0 ? void 0 : task.type) !== "test") {
|
|
1773
|
+
task = undefined;
|
|
1774
|
+
}
|
|
1771
1775
|
const matcherState = {
|
|
1772
1776
|
...getState(expect),
|
|
1777
|
+
task,
|
|
1773
1778
|
customTesters: getCustomEqualityTesters(),
|
|
1774
1779
|
isNot,
|
|
1775
1780
|
utils: jestUtils,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/expect",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.11",
|
|
5
5
|
"description": "Jest's expect matchers as a Chai plugin",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@types/chai": "^5.2.2",
|
|
34
34
|
"chai": "^6.2.1",
|
|
35
35
|
"tinyrainbow": "^3.0.3",
|
|
36
|
-
"@vitest/
|
|
37
|
-
"@vitest/
|
|
36
|
+
"@vitest/utils": "4.0.11",
|
|
37
|
+
"@vitest/spy": "4.0.11"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@vitest/runner": "4.0.
|
|
40
|
+
"@vitest/runner": "4.0.11"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "premove dist && rollup -c",
|