@vitest/runner 0.29.2 → 0.29.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/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { V as VitestRunner } from './runner-
|
2
|
-
export { V as VitestRunner, a as VitestRunnerConfig, c as VitestRunnerConstructor, b as VitestRunnerImportSource } from './runner-
|
3
|
-
import { T as Task, F as File, S as SuiteAPI, a as TestAPI, b as SuiteCollector, c as SuiteHooks, H as HookListener, d as TestContext, e as Suite, f as HookCleanupCallback, O as OnTestFailedHandler, g as Test } from './tasks-
|
4
|
-
export { D as DoneCallback, F as File, f as HookCleanupCallback, H as HookListener, O as OnTestFailedHandler, R as RunMode, p as RuntimeContext, q as SequenceHooks, e as Suite, S as SuiteAPI, b as SuiteCollector, o as SuiteFactory, c as SuiteHooks, T as Task, i as TaskBase, j as TaskCustom, k as TaskResult, l as TaskResultPack, h as TaskState, g as Test, a as TestAPI, d as TestContext, m as TestFunction, n as TestOptions } from './tasks-
|
1
|
+
import { V as VitestRunner } from './runner-b9659804.js';
|
2
|
+
export { V as VitestRunner, a as VitestRunnerConfig, c as VitestRunnerConstructor, b as VitestRunnerImportSource } from './runner-b9659804.js';
|
3
|
+
import { T as Task, F as File, S as SuiteAPI, a as TestAPI, b as SuiteCollector, c as SuiteHooks, H as HookListener, d as TestContext, e as Suite, f as HookCleanupCallback, O as OnTestFailedHandler, g as Test } from './tasks-3fbb29e4.js';
|
4
|
+
export { D as DoneCallback, F as File, f as HookCleanupCallback, H as HookListener, O as OnTestFailedHandler, R as RunMode, p as RuntimeContext, q as SequenceHooks, r as SequenceSetupFiles, e as Suite, S as SuiteAPI, b as SuiteCollector, o as SuiteFactory, c as SuiteHooks, T as Task, i as TaskBase, j as TaskCustom, k as TaskResult, l as TaskResultPack, h as TaskState, g as Test, a as TestAPI, d as TestContext, m as TestFunction, n as TestOptions } from './tasks-3fbb29e4.js';
|
5
5
|
import { Awaitable } from '@vitest/utils';
|
6
6
|
|
7
7
|
declare function updateTask(task: Task, runner: VitestRunner): void;
|
package/dist/index.js
CHANGED
@@ -266,11 +266,16 @@ function formatTemplateString(cases, args) {
|
|
266
266
|
|
267
267
|
async function runSetupFiles(config, runner) {
|
268
268
|
const files = toArray(config.setupFiles);
|
269
|
-
|
270
|
-
|
269
|
+
if (config.sequence.setupFiles === "parallel") {
|
270
|
+
await Promise.all(
|
271
|
+
files.map(async (fsPath) => {
|
272
|
+
await runner.importFile(fsPath, "setup");
|
273
|
+
})
|
274
|
+
);
|
275
|
+
} else {
|
276
|
+
for (const fsPath of files)
|
271
277
|
await runner.importFile(fsPath, "setup");
|
272
|
-
|
273
|
-
);
|
278
|
+
}
|
274
279
|
}
|
275
280
|
|
276
281
|
const now$1 = Date.now;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { q as SequenceHooks, F as File, g as Test, e as Suite, k as TaskResult, d as TestContext } from './tasks-
|
1
|
+
import { q as SequenceHooks, r as SequenceSetupFiles, F as File, g as Test, e as Suite, k as TaskResult, d as TestContext } from './tasks-3fbb29e4.js';
|
2
2
|
|
3
3
|
interface VitestRunnerConfig {
|
4
4
|
root: string;
|
@@ -11,6 +11,7 @@ interface VitestRunnerConfig {
|
|
11
11
|
shuffle?: boolean;
|
12
12
|
seed: number;
|
13
13
|
hooks: SequenceHooks;
|
14
|
+
setupFiles: SequenceSetupFiles;
|
14
15
|
};
|
15
16
|
maxConcurrency: number;
|
16
17
|
testTimeout: number;
|
@@ -191,5 +191,6 @@ interface TestContext {
|
|
191
191
|
}
|
192
192
|
type OnTestFailedHandler = (result: TaskResult) => Awaitable<void>;
|
193
193
|
type SequenceHooks = 'stack' | 'list' | 'parallel';
|
194
|
+
type SequenceSetupFiles = 'list' | 'parallel';
|
194
195
|
|
195
|
-
export { ChainableFunction as C, DoneCallback as D, ErrorWithDiff as E, File as F, HookListener as H, OnTestFailedHandler as O, ParsedStack as P, RunMode as R, SuiteAPI as S, Task as T, TestAPI as a, SuiteCollector as b, SuiteHooks as c, TestContext as d, Suite as e, HookCleanupCallback as f, Test as g, TaskState as h, TaskBase as i, TaskCustom as j, TaskResult as k, TaskResultPack as l, TestFunction as m, TestOptions as n, SuiteFactory as o, RuntimeContext as p, SequenceHooks as q,
|
196
|
+
export { ChainableFunction as C, DoneCallback as D, ErrorWithDiff as E, File as F, HookListener as H, OnTestFailedHandler as O, ParsedStack as P, RunMode as R, SuiteAPI as S, Task as T, TestAPI as a, SuiteCollector as b, SuiteHooks as c, TestContext as d, Suite as e, HookCleanupCallback as f, Test as g, TaskState as h, TaskBase as i, TaskCustom as j, TaskResult as k, TaskResultPack as l, TestFunction as m, TestOptions as n, SuiteFactory as o, RuntimeContext as p, SequenceHooks as q, SequenceSetupFiles as r, createChainable as s, serializeError as t, processError as u, replaceAsymmetricMatcher as v };
|
package/dist/types.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { D as DoneCallback, F as File, f as HookCleanupCallback, H as HookListener, O as OnTestFailedHandler, R as RunMode, p as RuntimeContext, q as SequenceHooks, e as Suite, S as SuiteAPI, b as SuiteCollector, o as SuiteFactory, c as SuiteHooks, T as Task, i as TaskBase, j as TaskCustom, k as TaskResult, l as TaskResultPack, h as TaskState, g as Test, a as TestAPI, d as TestContext, m as TestFunction, n as TestOptions } from './tasks-
|
2
|
-
export { V as VitestRunner, a as VitestRunnerConfig, c as VitestRunnerConstructor, b as VitestRunnerImportSource } from './runner-
|
1
|
+
export { D as DoneCallback, F as File, f as HookCleanupCallback, H as HookListener, O as OnTestFailedHandler, R as RunMode, p as RuntimeContext, q as SequenceHooks, r as SequenceSetupFiles, e as Suite, S as SuiteAPI, b as SuiteCollector, o as SuiteFactory, c as SuiteHooks, T as Task, i as TaskBase, j as TaskCustom, k as TaskResult, l as TaskResultPack, h as TaskState, g as Test, a as TestAPI, d as TestContext, m as TestFunction, n as TestOptions } from './tasks-3fbb29e4.js';
|
2
|
+
export { V as VitestRunner, a as VitestRunnerConfig, c as VitestRunnerConstructor, b as VitestRunnerImportSource } from './runner-b9659804.js';
|
3
3
|
import '@vitest/utils';
|
package/dist/utils.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { e as Suite, T as Task, g as Test, j as TaskCustom } from './tasks-
|
2
|
-
export { C as ChainableFunction, E as ErrorWithDiff, P as ParsedStack,
|
1
|
+
import { e as Suite, T as Task, g as Test, j as TaskCustom } from './tasks-3fbb29e4.js';
|
2
|
+
export { C as ChainableFunction, E as ErrorWithDiff, P as ParsedStack, s as createChainable, u as processError, v as replaceAsymmetricMatcher, t as serializeError } from './tasks-3fbb29e4.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": "0.29.
|
4
|
+
"version": "0.29.4",
|
5
5
|
"description": "Vitest test runner",
|
6
6
|
"license": "MIT",
|
7
7
|
"repository": {
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"dependencies": {
|
36
36
|
"p-limit": "^4.0.0",
|
37
37
|
"pathe": "^1.1.0",
|
38
|
-
"@vitest/utils": "0.29.
|
38
|
+
"@vitest/utils": "0.29.4"
|
39
39
|
},
|
40
40
|
"scripts": {
|
41
41
|
"build": "rimraf dist && rollup -c",
|