@vitest/runner 3.0.0-beta.3 → 3.0.0-beta.4
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/chunk-tasks.js +12 -0
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/dist/chunk-tasks.js
CHANGED
@@ -67,6 +67,8 @@ function interpretTaskModes(file, namePattern, testLocations, onlyMode, parentIs
|
|
67
67
|
} else if (t.type === "suite") {
|
68
68
|
if (t.mode === "skip") {
|
69
69
|
skipAllTasks(t);
|
70
|
+
} else if (t.mode === "todo") {
|
71
|
+
todoAllTasks(t);
|
70
72
|
} else {
|
71
73
|
traverseSuite(t, includeTask, hasLocationMatch);
|
72
74
|
}
|
@@ -114,6 +116,16 @@ function skipAllTasks(suite) {
|
|
114
116
|
}
|
115
117
|
});
|
116
118
|
}
|
119
|
+
function todoAllTasks(suite) {
|
120
|
+
suite.tasks.forEach((t) => {
|
121
|
+
if (t.mode === "run" || t.mode === "queued") {
|
122
|
+
t.mode = "todo";
|
123
|
+
if (t.type === "suite") {
|
124
|
+
todoAllTasks(t);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
});
|
128
|
+
}
|
117
129
|
function checkAllowOnly(task, allowOnly) {
|
118
130
|
if (allowOnly) {
|
119
131
|
return;
|
package/dist/index.js
CHANGED
@@ -433,7 +433,7 @@ function createSuiteCollector(name, factory = () => {
|
|
433
433
|
setFn(
|
434
434
|
task2,
|
435
435
|
withTimeout(
|
436
|
-
|
436
|
+
withAwaitAsyncAssertions(withFixtures(handler, context), task2),
|
437
437
|
(options == null ? void 0 : options.timeout) ?? runner.config.testTimeout
|
438
438
|
)
|
439
439
|
);
|
@@ -536,7 +536,7 @@ function createSuiteCollector(name, factory = () => {
|
|
536
536
|
collectTask(collector);
|
537
537
|
return collector;
|
538
538
|
}
|
539
|
-
function
|
539
|
+
function withAwaitAsyncAssertions(fn, task) {
|
540
540
|
return async (...args) => {
|
541
541
|
await fn(...args);
|
542
542
|
if (task.promises) {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/runner",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.0.0-beta.
|
4
|
+
"version": "3.0.0-beta.4",
|
5
5
|
"description": "Vitest test runner",
|
6
6
|
"license": "MIT",
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
@@ -38,8 +38,8 @@
|
|
38
38
|
"dist"
|
39
39
|
],
|
40
40
|
"dependencies": {
|
41
|
-
"pathe": "^
|
42
|
-
"@vitest/utils": "3.0.0-beta.
|
41
|
+
"pathe": "^2.0.0",
|
42
|
+
"@vitest/utils": "3.0.0-beta.4"
|
43
43
|
},
|
44
44
|
"scripts": {
|
45
45
|
"build": "rimraf dist && rollup -c",
|