@vitest/runner 4.0.0-beta.13 → 4.0.0-beta.14
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.js +2 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -564,7 +564,7 @@ function createSuiteHooks() {
|
|
|
564
564
|
};
|
|
565
565
|
}
|
|
566
566
|
function parseArguments(optionsOrFn, timeoutOrTest) {
|
|
567
|
-
if (typeof timeoutOrTest === "object") {
|
|
567
|
+
if (timeoutOrTest != null && typeof timeoutOrTest === "object") {
|
|
568
568
|
throw new TypeError(`Siganture "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.`);
|
|
569
569
|
}
|
|
570
570
|
let options = {};
|
|
@@ -904,16 +904,13 @@ function createTaskCollector(fn, context) {
|
|
|
904
904
|
const _context = mergeContextFixtures(fixtures, context || {}, runner);
|
|
905
905
|
const originalWrapper = fn;
|
|
906
906
|
return createTest(function(name, optionsOrFn, optionsOrTest) {
|
|
907
|
-
var _collector$options;
|
|
908
907
|
const collector = getCurrentSuite();
|
|
909
908
|
const scopedFixtures = collector.fixtures();
|
|
910
909
|
const context = { ...this };
|
|
911
910
|
if (scopedFixtures) {
|
|
912
911
|
context.fixtures = mergeScopedFixtures(context.fixtures || [], scopedFixtures);
|
|
913
912
|
}
|
|
914
|
-
|
|
915
|
-
const timeout = options.timeout ?? ((_collector$options = collector.options) === null || _collector$options === void 0 ? void 0 : _collector$options.timeout) ?? (runner === null || runner === void 0 ? void 0 : runner.config.testTimeout);
|
|
916
|
-
originalWrapper.call(context, formatName(name), handler, timeout);
|
|
913
|
+
originalWrapper.call(context, formatName(name), optionsOrFn, optionsOrTest);
|
|
917
914
|
}, _context);
|
|
918
915
|
};
|
|
919
916
|
const _test = createChainable([
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/runner",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.14",
|
|
5
5
|
"description": "Vitest test runner",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"pathe": "^2.0.3",
|
|
42
|
-
"@vitest/utils": "4.0.0-beta.
|
|
42
|
+
"@vitest/utils": "4.0.0-beta.14"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "premove dist && rollup -c",
|