@vitest/runner 3.2.3 → 4.0.0-beta.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/dist/chunk-hooks.js
CHANGED
@@ -896,14 +896,17 @@ function createTaskCollector(fn, context) {
|
|
896
896
|
};
|
897
897
|
taskFn.extend = function(fixtures) {
|
898
898
|
const _context = mergeContextFixtures(fixtures, context || {}, runner);
|
899
|
-
|
899
|
+
const originalWrapper = fn;
|
900
|
+
return createTest(function(name, optionsOrFn, optionsOrTest) {
|
900
901
|
const collector = getCurrentSuite();
|
901
902
|
const scopedFixtures = collector.fixtures();
|
902
903
|
const context = { ...this };
|
903
904
|
if (scopedFixtures) {
|
904
905
|
context.fixtures = mergeScopedFixtures(context.fixtures || [], scopedFixtures);
|
905
906
|
}
|
906
|
-
|
907
|
+
const { handler, options } = parseArguments(optionsOrFn, optionsOrTest);
|
908
|
+
const timeout = options.timeout ?? (runner === null || runner === void 0 ? void 0 : runner.config.testTimeout);
|
909
|
+
originalWrapper.call(context, formatName(name), handler, timeout);
|
907
910
|
}, _context);
|
908
911
|
};
|
909
912
|
const _test = createChainable([
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { A as AfterAllListener, b as AfterEachListener, B as BeforeAllListener, d as BeforeEachListener, e as TaskHook, O as OnTestFailedHandler, f as OnTestFinishedHandler, a as Test, g as Custom, S as Suite, h as SuiteHooks, F as File, i as TaskUpdateEvent, T as Task, j as TestAPI, k as SuiteAPI, l as SuiteCollector } from './tasks.d-
|
2
|
-
export { D as DoneCallback, E as ExtendedContext, m as Fixture, n as FixtureFn, o as FixtureOptions, p as Fixtures, H as HookCleanupCallback, q as HookListener, I as ImportDuration, r as InferFixturesTypes, R as RunMode, s as RuntimeContext, t as SequenceHooks, u as SequenceSetupFiles, v as SuiteFactory, w as TaskBase, x as TaskContext, y as TaskCustomOptions, z as TaskEventPack, G as TaskMeta, J as TaskPopulated, K as TaskResult, L as TaskResultPack, M as TaskState, N as TestAnnotation, P as TestAnnotationLocation, Q as TestAttachment, U as TestContext, V as TestFunction, W as TestOptions, X as Use } from './tasks.d-
|
1
|
+
import { A as AfterAllListener, b as AfterEachListener, B as BeforeAllListener, d as BeforeEachListener, e as TaskHook, O as OnTestFailedHandler, f as OnTestFinishedHandler, a as Test, g as Custom, S as Suite, h as SuiteHooks, F as File, i as TaskUpdateEvent, T as Task, j as TestAPI, k as SuiteAPI, l as SuiteCollector } from './tasks.d-ZIXcbWf9.js';
|
2
|
+
export { D as DoneCallback, E as ExtendedContext, m as Fixture, n as FixtureFn, o as FixtureOptions, p as Fixtures, H as HookCleanupCallback, q as HookListener, I as ImportDuration, r as InferFixturesTypes, R as RunMode, s as RuntimeContext, t as SequenceHooks, u as SequenceSetupFiles, v as SuiteFactory, w as TaskBase, x as TaskContext, y as TaskCustomOptions, z as TaskEventPack, G as TaskMeta, J as TaskPopulated, K as TaskResult, L as TaskResultPack, M as TaskState, N as TestAnnotation, P as TestAnnotationLocation, Q as TestAttachment, U as TestContext, V as TestFunction, W as TestOptions, X as Use } from './tasks.d-ZIXcbWf9.js';
|
3
3
|
import { Awaitable } from '@vitest/utils';
|
4
4
|
import { FileSpecification, VitestRunner } from './types.js';
|
5
5
|
export { CancelReason, VitestRunnerConfig, VitestRunnerConstructor, VitestRunnerImportSource } from './types.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { TestError, Awaitable } from '@vitest/utils';
|
2
2
|
|
3
3
|
interface FixtureItem extends FixtureOptions {
|
4
4
|
prop: string;
|
@@ -129,7 +129,7 @@ interface TaskResult {
|
|
129
129
|
* Errors that occurred during the task execution. It is possible to have several errors
|
130
130
|
* if `expect.soft()` failed multiple times or `retry` was triggered.
|
131
131
|
*/
|
132
|
-
errors?:
|
132
|
+
errors?: TestError[];
|
133
133
|
/**
|
134
134
|
* How long in milliseconds the task took to run.
|
135
135
|
*/
|
package/dist/types.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DiffOptions } from '@vitest/utils/diff';
|
2
|
-
import { F as File, a as Test, S as Suite, L as TaskResultPack, z as TaskEventPack, N as TestAnnotation, U as TestContext, I as ImportDuration, t as SequenceHooks, u as SequenceSetupFiles } from './tasks.d-
|
3
|
-
export { A as AfterAllListener, b as AfterEachListener, B as BeforeAllListener, d as BeforeEachListener, g as Custom, j as CustomAPI, D as DoneCallback, E as ExtendedContext, m as Fixture, n as FixtureFn, o as FixtureOptions, p as Fixtures, H as HookCleanupCallback, q as HookListener, r as InferFixturesTypes, O as OnTestFailedHandler, f as OnTestFinishedHandler, R as RunMode, s as RuntimeContext, k as SuiteAPI, l as SuiteCollector, v as SuiteFactory, h as SuiteHooks, T as Task, w as TaskBase, x as TaskContext, y as TaskCustomOptions, e as TaskHook, G as TaskMeta, J as TaskPopulated, K as TaskResult, M as TaskState, i as TaskUpdateEvent, j as TestAPI, P as TestAnnotationLocation, Q as TestAttachment, V as TestFunction, W as TestOptions, X as Use } from './tasks.d-
|
2
|
+
import { F as File, a as Test, S as Suite, L as TaskResultPack, z as TaskEventPack, N as TestAnnotation, U as TestContext, I as ImportDuration, t as SequenceHooks, u as SequenceSetupFiles } from './tasks.d-ZIXcbWf9.js';
|
3
|
+
export { A as AfterAllListener, b as AfterEachListener, B as BeforeAllListener, d as BeforeEachListener, g as Custom, j as CustomAPI, D as DoneCallback, E as ExtendedContext, m as Fixture, n as FixtureFn, o as FixtureOptions, p as Fixtures, H as HookCleanupCallback, q as HookListener, r as InferFixturesTypes, O as OnTestFailedHandler, f as OnTestFinishedHandler, R as RunMode, s as RuntimeContext, k as SuiteAPI, l as SuiteCollector, v as SuiteFactory, h as SuiteHooks, T as Task, w as TaskBase, x as TaskContext, y as TaskCustomOptions, e as TaskHook, G as TaskMeta, J as TaskPopulated, K as TaskResult, M as TaskState, i as TaskUpdateEvent, j as TestAPI, P as TestAnnotationLocation, Q as TestAttachment, V as TestFunction, W as TestOptions, X as Use } from './tasks.d-ZIXcbWf9.js';
|
4
4
|
import '@vitest/utils';
|
5
5
|
|
6
6
|
/**
|
package/dist/utils.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { S as Suite, F as File, T as Task, a as Test } from './tasks.d-
|
2
|
-
export { C as ChainableFunction, c as createChainable } from './tasks.d-
|
1
|
+
import { S as Suite, F as File, T as Task, a as Test } from './tasks.d-ZIXcbWf9.js';
|
2
|
+
export { C as ChainableFunction, c as createChainable } from './tasks.d-ZIXcbWf9.js';
|
3
3
|
import { Arrayable } from '@vitest/utils';
|
4
4
|
|
5
5
|
/**
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/runner",
|
3
3
|
"type": "module",
|
4
|
-
"version": "
|
4
|
+
"version": "4.0.0-beta.1",
|
5
5
|
"description": "Vitest test runner",
|
6
6
|
"license": "MIT",
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"dependencies": {
|
41
41
|
"pathe": "^2.0.3",
|
42
42
|
"strip-literal": "^3.0.0",
|
43
|
-
"@vitest/utils": "
|
43
|
+
"@vitest/utils": "4.0.0-beta.1"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"build": "rimraf dist && rollup -c",
|