@vitest/runner 2.2.0-beta.2 → 3.0.0-beta.2

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.
@@ -29,39 +29,71 @@ function createChainable(keys, fn) {
29
29
  return chain;
30
30
  }
31
31
 
32
- function interpretTaskModes(suite, namePattern, onlyMode, parentIsOnly, allowOnly) {
33
- const suiteIsOnly = parentIsOnly || suite.mode === "only";
34
- suite.tasks.forEach((t) => {
35
- const includeTask = suiteIsOnly || t.mode === "only";
36
- if (onlyMode) {
37
- if (t.type === "suite" && (includeTask || someTasksAreOnly(t))) {
38
- if (t.mode === "only") {
32
+ function interpretTaskModes(file, namePattern, testLocations, onlyMode, parentIsOnly, allowOnly) {
33
+ const matchedLocations = [];
34
+ const traverseSuite = (suite, parentIsOnly2, parentMatchedWithLocation) => {
35
+ const suiteIsOnly = parentIsOnly2 || suite.mode === "only";
36
+ suite.tasks.forEach((t) => {
37
+ const includeTask = suiteIsOnly || t.mode === "only";
38
+ if (onlyMode) {
39
+ if (t.type === "suite" && (includeTask || someTasksAreOnly(t))) {
40
+ if (t.mode === "only") {
41
+ checkAllowOnly(t, allowOnly);
42
+ t.mode = "run";
43
+ }
44
+ } else if (t.mode === "run" && !includeTask) {
45
+ t.mode = "skip";
46
+ } else if (t.mode === "only") {
39
47
  checkAllowOnly(t, allowOnly);
40
48
  t.mode = "run";
41
49
  }
42
- } else if (t.mode === "run" && !includeTask) {
43
- t.mode = "skip";
44
- } else if (t.mode === "only") {
45
- checkAllowOnly(t, allowOnly);
46
- t.mode = "run";
47
50
  }
48
- }
49
- if (t.type === "test") {
50
- if (namePattern && !getTaskFullName(t).match(namePattern)) {
51
- t.mode = "skip";
51
+ let hasLocationMatch = parentMatchedWithLocation;
52
+ if (testLocations !== void 0 && testLocations.length !== 0) {
53
+ if (t.location && (testLocations == null ? void 0 : testLocations.includes(t.location.line))) {
54
+ t.mode = "run";
55
+ matchedLocations.push(t.location.line);
56
+ hasLocationMatch = true;
57
+ } else if (parentMatchedWithLocation) {
58
+ t.mode = "run";
59
+ } else if (t.type === "test") {
60
+ t.mode = "skip";
61
+ }
52
62
  }
53
- } else if (t.type === "suite") {
54
- if (t.mode === "skip") {
55
- skipAllTasks(t);
56
- } else {
57
- interpretTaskModes(t, namePattern, onlyMode, includeTask, allowOnly);
63
+ if (t.type === "test") {
64
+ if (namePattern && !getTaskFullName(t).match(namePattern)) {
65
+ t.mode = "skip";
66
+ }
67
+ } else if (t.type === "suite") {
68
+ if (t.mode === "skip") {
69
+ skipAllTasks(t);
70
+ } else {
71
+ traverseSuite(t, includeTask, hasLocationMatch);
72
+ }
73
+ }
74
+ });
75
+ if (suite.mode === "run") {
76
+ if (suite.tasks.length && suite.tasks.every((i) => i.mode !== "run")) {
77
+ suite.mode = "skip";
58
78
  }
59
79
  }
60
- });
61
- if (suite.mode === "run") {
62
- if (suite.tasks.length && suite.tasks.every((i) => i.mode !== "run")) {
63
- suite.mode = "skip";
80
+ };
81
+ traverseSuite(file, parentIsOnly, false);
82
+ const nonMatching = testLocations == null ? void 0 : testLocations.filter((loc) => !matchedLocations.includes(loc));
83
+ if (nonMatching && nonMatching.length !== 0) {
84
+ const message = nonMatching.length === 1 ? `line ${nonMatching[0]}` : `lines ${nonMatching.join(", ")}`;
85
+ if (file.result === void 0) {
86
+ file.result = {
87
+ state: "fail",
88
+ errors: []
89
+ };
64
90
  }
91
+ if (file.result.errors === void 0) {
92
+ file.result.errors = [];
93
+ }
94
+ file.result.errors.push(
95
+ processError(new Error(`No test found in ${file.name} in ${message}`))
96
+ );
65
97
  }
66
98
  }
67
99
  function getTaskFullName(task) {
@@ -119,7 +151,7 @@ function calculateSuiteHash(parent) {
119
151
  function createFileTask(filepath, root, projectName, pool) {
120
152
  const path = relative(root, filepath);
121
153
  const file = {
122
- id: generateHash(`${path}${projectName || ""}`),
154
+ id: generateFileHash(path, projectName),
123
155
  name: path,
124
156
  type: "suite",
125
157
  mode: "run",
@@ -133,6 +165,9 @@ function createFileTask(filepath, root, projectName, pool) {
133
165
  file.file = file;
134
166
  return file;
135
167
  }
168
+ function generateFileHash(file, projectName) {
169
+ return generateHash(`${file}${projectName || ""}`);
170
+ }
136
171
 
137
172
  function limitConcurrency(concurrency = Infinity) {
138
173
  let count = 0;
@@ -182,7 +217,7 @@ function isAtomTest(s) {
182
217
  return isTestCase(s);
183
218
  }
184
219
  function isTestCase(s) {
185
- return s.type === "test" || s.type === "custom";
220
+ return s.type === "test";
186
221
  }
187
222
  function getTests(suite) {
188
223
  const tests = [];
@@ -249,4 +284,4 @@ function getTestName(task, separator = " > ") {
249
284
  return getNames(task).slice(1).join(separator);
250
285
  }
251
286
 
252
- export { calculateSuiteHash as a, createFileTask as b, createChainable as c, getFullName as d, getNames as e, getSuites as f, generateHash as g, getTasks as h, interpretTaskModes as i, getTestName as j, getTests as k, limitConcurrency as l, hasFailed as m, hasTests as n, isAtomTest as o, partitionSuiteChildren as p, someTasksAreOnly as s };
287
+ export { calculateSuiteHash as a, createFileTask as b, createChainable as c, generateHash as d, getFullName as e, getNames as f, generateFileHash as g, getSuites as h, interpretTaskModes as i, getTasks as j, getTestName as k, limitConcurrency as l, getTests as m, hasFailed as n, hasTests as o, partitionSuiteChildren as p, isAtomTest as q, isTestCase as r, someTasksAreOnly as s };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { B as BeforeAllListener, A as AfterAllListener, d as BeforeEachListener, e as AfterEachListener, f as TaskHook, O as OnTestFailedHandler, g as OnTestFinishedHandler, a as Test, C as Custom, S as Suite, h as SuiteHooks, T as Task, F as File, i as SuiteAPI, j as TestAPI, k as SuiteCollector } from './tasks-CgWT5bp6.js';
2
- export { D as DoneCallback, E as ExtendedContext, l as Fixture, m as FixtureFn, n as FixtureOptions, o as Fixtures, H as HookCleanupCallback, p as HookListener, I as InferFixturesTypes, R as RunMode, q as RuntimeContext, r as SequenceHooks, s as SequenceSetupFiles, t as SuiteFactory, u as TaskBase, v as TaskContext, w as TaskCustomOptions, x as TaskMeta, y as TaskPopulated, z as TaskResult, G as TaskResultPack, J as TaskState, K as TestContext, L as TestFunction, M as TestOptions, U as Use } from './tasks-CgWT5bp6.js';
1
+ import { B as BeforeAllListener, A as AfterAllListener, b as BeforeEachListener, d as AfterEachListener, e as TaskHook, O as OnTestFailedHandler, f as OnTestFinishedHandler, a as Test, g as Custom, S as Suite, h as SuiteHooks, T as Task, F as File, i as SuiteAPI, j as TestAPI, k as SuiteCollector } from './tasks-DaEhEbK_.js';
2
+ export { D as DoneCallback, E as ExtendedContext, l as Fixture, m as FixtureFn, n as FixtureOptions, o as Fixtures, H as HookCleanupCallback, p as HookListener, I as InferFixturesTypes, R as RunMode, q as RuntimeContext, r as SequenceHooks, s as SequenceSetupFiles, t as SuiteFactory, u as TaskBase, v as TaskContext, w as TaskCustomOptions, x as TaskMeta, y as TaskPopulated, z as TaskResult, G as TaskResultPack, J as TaskState, K as TestContext, L as TestFunction, M as TestOptions, U as Use } from './tasks-DaEhEbK_.js';
3
3
  import { Awaitable } from '@vitest/utils';
4
- import { VitestRunner } from './types.js';
4
+ import { VitestRunner, FileSpecification } from './types.js';
5
5
  export { CancelReason, VitestRunnerConfig, VitestRunnerConstructor, VitestRunnerImportSource } from './types.js';
6
6
  export { processError } from '@vitest/utils/error';
7
7
  import '@vitest/utils/diff';
@@ -126,8 +126,8 @@ declare function setHooks(key: Suite, hooks: SuiteHooks): void;
126
126
  declare function getHooks(key: Suite): SuiteHooks;
127
127
 
128
128
  declare function updateTask(task: Task, runner: VitestRunner): void;
129
- declare function startTests(paths: string[], runner: VitestRunner): Promise<File[]>;
130
- declare function publicCollect(paths: string[], runner: VitestRunner): Promise<File[]>;
129
+ declare function startTests(specs: string[] | FileSpecification[], runner: VitestRunner): Promise<File[]>;
130
+ declare function publicCollect(specs: string[] | FileSpecification[], runner: VitestRunner): Promise<File[]>;
131
131
 
132
132
  /**
133
133
  * Creates a suite of tests, allowing for grouping and hierarchical organization of tests.
@@ -254,6 +254,6 @@ declare const it: TestAPI;
254
254
  declare function getCurrentSuite<ExtraContext = object>(): SuiteCollector<ExtraContext>;
255
255
  declare function createTaskCollector(fn: (...args: any[]) => any, context?: Record<string, unknown>): TestAPI;
256
256
 
257
- declare function getCurrentTest<T extends Test | Custom | undefined>(): T;
257
+ declare function getCurrentTest<T extends Test | undefined>(): T;
258
258
 
259
- export { AfterAllListener, AfterEachListener, BeforeAllListener, BeforeEachListener, Custom, TestAPI as CustomAPI, File, OnTestFailedHandler, OnTestFinishedHandler, Suite, SuiteAPI, SuiteCollector, SuiteHooks, Task, TaskHook, Test, TestAPI, VitestRunner, afterAll, afterEach, beforeAll, beforeEach, publicCollect as collectTests, createTaskCollector, describe, getCurrentSuite, getCurrentTest, getFn, getHooks, it, onTestFailed, onTestFinished, setFn, setHooks, startTests, suite, test, updateTask };
259
+ export { AfterAllListener, AfterEachListener, BeforeAllListener, BeforeEachListener, Custom, TestAPI as CustomAPI, File, FileSpecification, OnTestFailedHandler, OnTestFinishedHandler, Suite, SuiteAPI, SuiteCollector, SuiteHooks, Task, TaskHook, Test, TestAPI, VitestRunner, afterAll, afterEach, beforeAll, beforeEach, publicCollect as collectTests, createTaskCollector, describe, getCurrentSuite, getCurrentTest, getFn, getHooks, it, onTestFailed, onTestFinished, setFn, setHooks, startTests, suite, test, updateTask };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { getSafeTimers, isObject, createDefer, isNegativeNaN, format, objDisplay, objectAttr, toArray, assertTypes, shuffle } from '@vitest/utils';
2
2
  import { parseSingleStack } from '@vitest/utils/source-map';
3
- import { c as createChainable, b as createFileTask, a as calculateSuiteHash, s as someTasksAreOnly, i as interpretTaskModes, l as limitConcurrency, p as partitionSuiteChildren, n as hasTests, m as hasFailed } from './chunk-tasks.js';
3
+ import { c as createChainable, b as createFileTask, a as calculateSuiteHash, s as someTasksAreOnly, i as interpretTaskModes, l as limitConcurrency, p as partitionSuiteChildren, o as hasTests, n as hasFailed } from './chunk-tasks.js';
4
4
  import { processError } from '@vitest/utils/error';
5
5
  export { processError } from '@vitest/utils/error';
6
6
  import 'pathe';
@@ -37,7 +37,6 @@ function withTimeout(fn, timeout, isHook = false) {
37
37
  const { setTimeout, clearTimeout } = getSafeTimers();
38
38
  return function runWithTimeout(...args) {
39
39
  return Promise.race([
40
- fn(...args),
41
40
  new Promise((resolve, reject) => {
42
41
  var _a;
43
42
  const timer = setTimeout(() => {
@@ -45,6 +44,9 @@ function withTimeout(fn, timeout, isHook = false) {
45
44
  reject(new Error(makeTimeoutMsg(isHook, timeout)));
46
45
  }, timeout);
47
46
  (_a = timer.unref) == null ? void 0 : _a.call(timer);
47
+ }),
48
+ Promise.resolve(fn(...args)).then((result) => {
49
+ return new Promise((resolve) => setTimeout(resolve, 0, result));
48
50
  })
49
51
  ]);
50
52
  };
@@ -59,13 +61,17 @@ function createTestContext(test, runner) {
59
61
  test.pending = true;
60
62
  throw new PendingError("test is skipped; abort execution", test, note);
61
63
  };
62
- context.onTestFailed = (fn) => {
64
+ context.onTestFailed = (handler, timeout) => {
63
65
  test.onFailed || (test.onFailed = []);
64
- test.onFailed.push(fn);
66
+ test.onFailed.push(
67
+ withTimeout(handler, timeout ?? runner.config.hookTimeout, true)
68
+ );
65
69
  };
66
- context.onTestFinished = (fn) => {
70
+ context.onTestFinished = (handler, timeout) => {
67
71
  test.onFinished || (test.onFinished = []);
68
- test.onFinished.push(fn);
72
+ test.onFinished.push(
73
+ withTimeout(handler, timeout ?? runner.config.hookTimeout, true)
74
+ );
69
75
  };
70
76
  return ((_a = runner.extendTaskContext) == null ? void 0 : _a.call(runner, context)) || context;
71
77
  }
@@ -331,8 +337,7 @@ function getRunner() {
331
337
  }
332
338
  function createDefaultSuite(runner2) {
333
339
  const config = runner2.config.sequence;
334
- const api = config.shuffle ? suite.shuffle : suite;
335
- return api("", { concurrent: config.concurrent }, () => {
340
+ return suite("", { concurrent: config.concurrent }, () => {
336
341
  });
337
342
  }
338
343
  function clearCollectorContext(filepath, currentRunner) {
@@ -368,6 +373,9 @@ function parseArguments(optionsOrFn, optionsOrTest) {
368
373
  "Cannot use two objects as arguments. Please provide options and a function callback in that order."
369
374
  );
370
375
  }
376
+ console.warn(
377
+ "Using an object as a third argument is deprecated. Vitest 4 will throw an error if the third argument is not a timeout number. Please use the second argument for options. See more at https://vitest.dev/guide/migration"
378
+ );
371
379
  options = optionsOrTest;
372
380
  } else if (typeof optionsOrTest === "number") {
373
381
  options = { timeout: optionsOrTest };
@@ -390,7 +398,7 @@ function parseArguments(optionsOrFn, optionsOrTest) {
390
398
  };
391
399
  }
392
400
  function createSuiteCollector(name, factory = () => {
393
- }, mode, shuffle, each, suiteOptions) {
401
+ }, mode, each, suiteOptions) {
394
402
  const tasks = [];
395
403
  const factoryQueue = [];
396
404
  let suite2;
@@ -414,9 +422,7 @@ function createSuiteCollector(name, factory = () => {
414
422
  if (options.concurrent || !options.sequential && runner.config.sequence.concurrent) {
415
423
  task2.concurrent = true;
416
424
  }
417
- if (shuffle) {
418
- task2.shuffle = true;
419
- }
425
+ task2.shuffle = suiteOptions == null ? void 0 : suiteOptions.shuffle;
420
426
  const context = createTestContext(task2, runner);
421
427
  Object.defineProperty(task2, "context", {
422
428
  value: context,
@@ -485,7 +491,7 @@ function createSuiteCollector(name, factory = () => {
485
491
  mode,
486
492
  each,
487
493
  file: void 0,
488
- shuffle,
494
+ shuffle: suiteOptions == null ? void 0 : suiteOptions.shuffle,
489
495
  tasks: [],
490
496
  meta: /* @__PURE__ */ Object.create(null),
491
497
  concurrent: suiteOptions == null ? void 0 : suiteOptions.concurrent
@@ -543,7 +549,8 @@ function withAwaitAsyncAssetions(fn, task) {
543
549
  };
544
550
  }
545
551
  function createSuite() {
546
- function suiteFn(name, factoryOrOptions, optionsOrFactory = {}) {
552
+ function suiteFn(name, factoryOrOptions, optionsOrFactory) {
553
+ var _a;
547
554
  const mode = this.only ? "only" : this.skip ? "skip" : this.todo ? "todo" : "run";
548
555
  const currentSuite = collectorContext.currentSuite || defaultSuite;
549
556
  let { options, handler: factory } = parseArguments(
@@ -552,9 +559,11 @@ function createSuite() {
552
559
  );
553
560
  const isConcurrentSpecified = options.concurrent || this.concurrent || options.sequential === false;
554
561
  const isSequentialSpecified = options.sequential || this.sequential || options.concurrent === false;
555
- if (currentSuite == null ? void 0 : currentSuite.options) {
556
- options = { ...currentSuite.options, ...options };
557
- }
562
+ options = {
563
+ ...currentSuite == null ? void 0 : currentSuite.options,
564
+ ...options,
565
+ shuffle: this.shuffle ?? options.shuffle ?? ((_a = currentSuite == null ? void 0 : currentSuite.options) == null ? void 0 : _a.shuffle) ?? (runner == null ? void 0 : runner.config.sequence.shuffle)
566
+ };
558
567
  const isConcurrent = isConcurrentSpecified || options.concurrent && !isSequentialSpecified;
559
568
  const isSequential = isSequentialSpecified || options.sequential && !isConcurrentSpecified;
560
569
  options.concurrent = isConcurrent && !isSequential;
@@ -563,7 +572,6 @@ function createSuite() {
563
572
  formatName(name),
564
573
  factory,
565
574
  mode,
566
- this.shuffle,
567
575
  this.each,
568
576
  options
569
577
  );
@@ -578,7 +586,7 @@ function createSuite() {
578
586
  const _name = formatName(name);
579
587
  const arrayOnlyCases = cases.every(Array.isArray);
580
588
  const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);
581
- const fnFirst = typeof optionsOrFn === "function";
589
+ const fnFirst = typeof optionsOrFn === "function" && typeof fnOrOptions === "object";
582
590
  cases.forEach((i, idx) => {
583
591
  const items = Array.isArray(i) ? i : [i];
584
592
  if (fnFirst) {
@@ -621,7 +629,7 @@ function createTaskCollector(fn, context) {
621
629
  const _name = formatName(name);
622
630
  const arrayOnlyCases = cases.every(Array.isArray);
623
631
  const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);
624
- const fnFirst = typeof optionsOrFn === "function";
632
+ const fnFirst = typeof optionsOrFn === "function" && typeof fnOrOptions === "object";
625
633
  cases.forEach((i, idx) => {
626
634
  const items = Array.isArray(i) ? i : [i];
627
635
  if (fnFirst) {
@@ -838,12 +846,15 @@ async function runSetupFiles(config, files, runner) {
838
846
  }
839
847
 
840
848
  const now$1 = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
841
- async function collectTests(paths, runner) {
849
+ async function collectTests(specs, runner) {
842
850
  var _a;
843
851
  const files = [];
844
852
  const config = runner.config;
845
- for (const filepath of paths) {
853
+ for (const spec of specs) {
854
+ const filepath = typeof spec === "string" ? spec : spec.filepath;
855
+ const testLocations = typeof spec === "string" ? void 0 : spec.testLocations;
846
856
  const file = createFileTask(filepath, config.root, config.name, runner.pool);
857
+ file.shuffle = config.sequence.shuffle;
847
858
  (_a = runner.onCollectStart) == null ? void 0 : _a.call(runner, file);
848
859
  clearCollectorContext(filepath, runner);
849
860
  try {
@@ -862,7 +873,7 @@ async function collectTests(paths, runner) {
862
873
  const fileHooks = createSuiteHooks();
863
874
  mergeHooks(fileHooks, getHooks(defaultTasks));
864
875
  for (const c of [...defaultTasks.tasks, ...collectorContext.tasks]) {
865
- if (c.type === "test" || c.type === "custom" || c.type === "suite") {
876
+ if (c.type === "test" || c.type === "suite") {
866
877
  file.tasks.push(c);
867
878
  } else if (c.type === "collector") {
868
879
  const suite = await c.collect(file);
@@ -894,6 +905,7 @@ async function collectTests(paths, runner) {
894
905
  interpretTaskModes(
895
906
  file,
896
907
  config.testNamePattern,
908
+ testLocations,
897
909
  hasOnlyTasks,
898
910
  false,
899
911
  config.allowOnly
@@ -933,25 +945,38 @@ function getSuiteHooks(suite, name, sequence) {
933
945
  }
934
946
  return hooks;
935
947
  }
936
- async function callTestHooks(runner, task, hooks, sequence) {
948
+ async function callTestHooks(runner, test, hooks, sequence) {
937
949
  if (sequence === "stack") {
938
950
  hooks = hooks.slice().reverse();
939
951
  }
952
+ if (!hooks.length) {
953
+ return;
954
+ }
955
+ const onTestFailed = test.context.onTestFailed;
956
+ const onTestFinished = test.context.onTestFinished;
957
+ test.context.onTestFailed = () => {
958
+ throw new Error(`Cannot call "onTestFailed" inside a test hook.`);
959
+ };
960
+ test.context.onTestFinished = () => {
961
+ throw new Error(`Cannot call "onTestFinished" inside a test hook.`);
962
+ };
940
963
  if (sequence === "parallel") {
941
964
  try {
942
- await Promise.all(hooks.map((fn) => fn(task.result)));
965
+ await Promise.all(hooks.map((fn) => fn(test.context)));
943
966
  } catch (e) {
944
- failTask(task.result, e, runner.config.diffOptions);
967
+ failTask(test.result, e, runner.config.diffOptions);
945
968
  }
946
969
  } else {
947
970
  for (const fn of hooks) {
948
971
  try {
949
- await fn(task.result);
972
+ await fn(test.context);
950
973
  } catch (e) {
951
- failTask(task.result, e, runner.config.diffOptions);
974
+ failTask(test.result, e, runner.config.diffOptions);
952
975
  }
953
976
  }
954
977
  }
978
+ test.context.onTestFailed = onTestFailed;
979
+ test.context.onTestFinished = onTestFinished;
955
980
  }
956
981
  async function callSuiteHook(suite, currentTask, name, runner, args) {
957
982
  const sequence = runner.config.sequence.hooks;
@@ -1201,7 +1226,7 @@ async function runSuite(suite, runner) {
1201
1226
  await Promise.all(tasksGroup.map((c) => runSuiteChild(c, runner)));
1202
1227
  } else {
1203
1228
  const { sequence } = runner.config;
1204
- if (sequence.shuffle || suite.shuffle) {
1229
+ if (suite.shuffle) {
1205
1230
  const suites = tasksGroup.filter(
1206
1231
  (group) => group.type === "suite"
1207
1232
  );
@@ -1248,7 +1273,7 @@ async function runSuite(suite, runner) {
1248
1273
  }
1249
1274
  let limitMaxConcurrency;
1250
1275
  async function runSuiteChild(c, runner) {
1251
- if (c.type === "test" || c.type === "custom") {
1276
+ if (c.type === "test") {
1252
1277
  return limitMaxConcurrency(() => runTest(c, runner));
1253
1278
  } else if (c.type === "suite") {
1254
1279
  return runSuite(c, runner);
@@ -1272,10 +1297,11 @@ async function runFiles(files, runner) {
1272
1297
  await runSuite(file, runner);
1273
1298
  }
1274
1299
  }
1275
- async function startTests(paths, runner) {
1300
+ async function startTests(specs, runner) {
1276
1301
  var _a, _b, _c, _d;
1302
+ const paths = specs.map((f) => typeof f === "string" ? f : f.filepath);
1277
1303
  await ((_a = runner.onBeforeCollect) == null ? void 0 : _a.call(runner, paths));
1278
- const files = await collectTests(paths, runner);
1304
+ const files = await collectTests(specs, runner);
1279
1305
  await ((_b = runner.onCollected) == null ? void 0 : _b.call(runner, files));
1280
1306
  await ((_c = runner.onBeforeRunFiles) == null ? void 0 : _c.call(runner, files));
1281
1307
  await runFiles(files, runner);
@@ -1283,10 +1309,11 @@ async function startTests(paths, runner) {
1283
1309
  await sendTasksUpdate(runner);
1284
1310
  return files;
1285
1311
  }
1286
- async function publicCollect(paths, runner) {
1312
+ async function publicCollect(specs, runner) {
1287
1313
  var _a, _b;
1314
+ const paths = specs.map((f) => typeof f === "string" ? f : f.filepath);
1288
1315
  await ((_a = runner.onBeforeCollect) == null ? void 0 : _a.call(runner, paths));
1289
- const files = await collectTests(paths, runner);
1316
+ const files = await collectTests(specs, runner);
1290
1317
  await ((_b = runner.onCollected) == null ? void 0 : _b.call(runner, files));
1291
1318
  return files;
1292
1319
  }
@@ -105,14 +105,6 @@ interface TaskPopulated extends TaskBase {
105
105
  * Whether the task should succeed if it fails. If the task fails, it will be marked as passed.
106
106
  */
107
107
  fails?: boolean;
108
- /**
109
- * Hooks that will run if the task fails. The order depends on the `sequence.hooks` option.
110
- */
111
- onFailed?: OnTestFailedHandler[];
112
- /**
113
- * Hooks that will run after the task finishes. The order depends on the `sequence.hooks` option.
114
- */
115
- onFinished?: OnTestFinishedHandler[];
116
108
  /**
117
109
  * Store promises (from async expects) to wait for them before finishing the test
118
110
  */
@@ -136,7 +128,7 @@ interface TaskResult {
136
128
  state: TaskState;
137
129
  /**
138
130
  * Errors that occurred during the task execution. It is possible to have several errors
139
- * if `expect.soft()` failed multiple times.
131
+ * if `expect.soft()` failed multiple times or `retry` was triggered.
140
132
  */
141
133
  errors?: ErrorWithDiff[];
142
134
  /**
@@ -221,38 +213,24 @@ interface File extends Suite {
221
213
  * The time it took to import the setup file.
222
214
  */
223
215
  setupDuration?: number;
224
- /**
225
- * Whether the file is initiated without running any tests.
226
- * This is done to populate state on the server side by Vitest.
227
- */
228
- local?: boolean;
229
216
  }
230
217
  interface Test<ExtraContext = object> extends TaskPopulated {
231
218
  type: 'test';
232
219
  /**
233
220
  * Test context that will be passed to the test function.
234
221
  */
235
- context: TaskContext<Test> & ExtraContext & TestContext;
222
+ context: TestContext & ExtraContext;
236
223
  }
237
224
  /**
238
225
  * @deprecated Use `Test` instead. `type: 'custom'` is not used since 2.2
239
226
  */
240
- interface Custom<ExtraContext = object> extends TaskPopulated {
241
- /**
242
- * @deprecated use `test` instead. `custom` is not used since 2.2
243
- */
244
- type: 'custom';
245
- /**
246
- * Task context that will be passed to the test function.
247
- */
248
- context: TaskContext<Test> & ExtraContext & TestContext;
249
- }
250
- type Task = Test | Suite | Custom | File;
227
+ type Custom<ExtraContext = object> = Test<ExtraContext>;
228
+ type Task = Test | Suite | File;
251
229
  /**
252
230
  * @deprecated Vitest doesn't provide `done()` anymore
253
231
  */
254
232
  type DoneCallback = (error?: any) => void;
255
- type TestFunction<ExtraContext = object> = (context: ExtendedContext<Test> & ExtraContext) => Awaitable<any> | void;
233
+ type TestFunction<ExtraContext = object> = (context: TestContext & ExtraContext) => Awaitable<any> | void;
256
234
  type ExtractEachCallbackArgs<T extends ReadonlyArray<any>> = {
257
235
  1: [T[0]];
258
236
  2: [T[0], T[1]];
@@ -270,9 +248,9 @@ interface EachFunctionReturn<T extends any[]> {
270
248
  /**
271
249
  * @deprecated Use options as the second argument instead
272
250
  */
273
- (name: string | Function, fn: (...args: T) => Awaitable<void>, options: TestOptions): void;
274
- (name: string | Function, fn: (...args: T) => Awaitable<void>, options?: number | TestOptions): void;
275
- (name: string | Function, options: TestOptions, fn: (...args: T) => Awaitable<void>): void;
251
+ (name: string | Function, fn: (...args: T) => Awaitable<void>, options: TestCollectorOptions): void;
252
+ (name: string | Function, fn: (...args: T) => Awaitable<void>, options?: number | TestCollectorOptions): void;
253
+ (name: string | Function, options: TestCollectorOptions, fn: (...args: T) => Awaitable<void>): void;
276
254
  }
277
255
  interface TestEachFunction {
278
256
  <T extends any[] | [any]>(cases: ReadonlyArray<T>): EachFunctionReturn<T>;
@@ -282,24 +260,25 @@ interface TestEachFunction {
282
260
  }
283
261
  interface TestForFunctionReturn<Arg, Context> {
284
262
  (name: string | Function, fn: (arg: Arg, context: Context) => Awaitable<void>): void;
285
- (name: string | Function, options: TestOptions, fn: (args: Arg, context: Context) => Awaitable<void>): void;
263
+ (name: string | Function, options: TestCollectorOptions, fn: (args: Arg, context: Context) => Awaitable<void>): void;
286
264
  }
287
265
  interface TestForFunction<ExtraContext> {
288
- <T>(cases: ReadonlyArray<T>): TestForFunctionReturn<T, ExtendedContext<Test> & ExtraContext>;
289
- (strings: TemplateStringsArray, ...values: any[]): TestForFunctionReturn<any, ExtendedContext<Test> & ExtraContext>;
266
+ <T>(cases: ReadonlyArray<T>): TestForFunctionReturn<T, TestContext & ExtraContext>;
267
+ (strings: TemplateStringsArray, ...values: any[]): TestForFunctionReturn<any, TestContext & ExtraContext>;
290
268
  }
291
269
  interface TestCollectorCallable<C = object> {
292
270
  /**
293
271
  * @deprecated Use options as the second argument instead
294
272
  */
295
- <ExtraContext extends C>(name: string | Function, fn: TestFunction<ExtraContext>, options: TestOptions): void;
296
- <ExtraContext extends C>(name: string | Function, fn?: TestFunction<ExtraContext>, options?: number | TestOptions): void;
297
- <ExtraContext extends C>(name: string | Function, options?: TestOptions, fn?: TestFunction<ExtraContext>): void;
273
+ <ExtraContext extends C>(name: string | Function, fn: TestFunction<ExtraContext>, options: TestCollectorOptions): void;
274
+ <ExtraContext extends C>(name: string | Function, fn?: TestFunction<ExtraContext>, options?: number | TestCollectorOptions): void;
275
+ <ExtraContext extends C>(name: string | Function, options?: TestCollectorOptions, fn?: TestFunction<ExtraContext>): void;
298
276
  }
299
277
  type ChainableTestAPI<ExtraContext = object> = ChainableFunction<'concurrent' | 'sequential' | 'only' | 'skip' | 'todo' | 'fails', TestCollectorCallable<ExtraContext>, {
300
278
  each: TestEachFunction;
301
279
  for: TestForFunction<ExtraContext>;
302
280
  }>;
281
+ type TestCollectorOptions = Omit<TestOptions, 'shuffle'>;
303
282
  interface TestOptions {
304
283
  /**
305
284
  * Test timeout.
@@ -329,6 +308,10 @@ interface TestOptions {
329
308
  * Tests inherit `sequential` from `describe()` and nested `describe()` will inherit from parent's `sequential`.
330
309
  */
331
310
  sequential?: boolean;
311
+ /**
312
+ * Whether the tasks of the suite run in a random order.
313
+ */
314
+ shuffle?: boolean;
332
315
  /**
333
316
  * Whether the test should be skipped.
334
317
  */
@@ -366,7 +349,7 @@ type Use<T> = (value: T) => Promise<void>;
366
349
  type FixtureFn<T, K extends keyof T, ExtraContext> = (context: Omit<T, K> & ExtraContext, use: Use<T[K]>) => Promise<void>;
367
350
  type Fixture<T, K extends keyof T, ExtraContext = object> = ((...args: any) => any) extends T[K] ? T[K] extends any ? FixtureFn<T, K, Omit<ExtraContext, Exclude<keyof T, K>>> : never : T[K] | (T[K] extends any ? FixtureFn<T, K, Omit<ExtraContext, Exclude<keyof T, K>>> : never);
368
351
  type Fixtures<T extends Record<string, any>, ExtraContext = object> = {
369
- [K in keyof T]: Fixture<T, K, ExtraContext & ExtendedContext<Test>> | [Fixture<T, K, ExtraContext & ExtendedContext<Test>>, FixtureOptions?];
352
+ [K in keyof T]: Fixture<T, K, ExtraContext & TestContext> | [Fixture<T, K, ExtraContext & TestContext>, FixtureOptions?];
370
353
  };
371
354
  type InferFixturesTypes<T> = T extends TestAPI<infer C> ? C : T;
372
355
  interface SuiteCollectorCallable<ExtraContext = object> {
@@ -399,10 +382,10 @@ interface AfterAllListener {
399
382
  (suite: Readonly<Suite | File>): Awaitable<unknown>;
400
383
  }
401
384
  interface BeforeEachListener<ExtraContext = object> {
402
- (context: ExtendedContext<Test> & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
385
+ (context: TestContext & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
403
386
  }
404
387
  interface AfterEachListener<ExtraContext = object> {
405
- (context: ExtendedContext<Test> & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
388
+ (context: TestContext & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
406
389
  }
407
390
  interface SuiteHooks<ExtraContext = object> {
408
391
  beforeAll: BeforeAllListener[];
@@ -428,7 +411,7 @@ interface TaskCustomOptions extends TestOptions {
428
411
  * If nothing is provided, the runner will try to get the function using `getFn(task)`.
429
412
  * If the runner cannot find the function, the task will be marked as failed.
430
413
  */
431
- handler?: (context: TaskContext<Test>) => Awaitable<void>;
414
+ handler?: (context: TestContext) => Awaitable<void>;
432
415
  }
433
416
  interface SuiteCollector<ExtraContext = object> {
434
417
  readonly name: string;
@@ -436,7 +419,7 @@ interface SuiteCollector<ExtraContext = object> {
436
419
  options?: TestOptions;
437
420
  type: 'collector';
438
421
  test: TestAPI<ExtraContext>;
439
- tasks: (Suite | Custom<ExtraContext> | Test<ExtraContext> | SuiteCollector<ExtraContext>)[];
422
+ tasks: (Suite | Test<ExtraContext> | SuiteCollector<ExtraContext>)[];
440
423
  task: (name: string, options?: TaskCustomOptions) => Test<ExtraContext>;
441
424
  collect: (file: File) => Promise<Suite>;
442
425
  clear: () => void;
@@ -451,11 +434,6 @@ interface RuntimeContext {
451
434
  * User's custom test context.
452
435
  */
453
436
  interface TestContext {
454
- }
455
- /**
456
- * Context that's always available in the test function.
457
- */
458
- interface TaskContext<Task extends Test = Test> {
459
437
  /**
460
438
  * Metadata of the current test
461
439
  */
@@ -463,24 +441,31 @@ interface TaskContext<Task extends Test = Test> {
463
441
  /**
464
442
  * Extract hooks on test failed
465
443
  */
466
- onTestFailed: (fn: OnTestFailedHandler) => void;
444
+ onTestFailed: (fn: OnTestFailedHandler, timeout?: number) => void;
467
445
  /**
468
446
  * Extract hooks on test failed
469
447
  */
470
- onTestFinished: (fn: OnTestFinishedHandler) => void;
448
+ onTestFinished: (fn: OnTestFinishedHandler, timeout?: number) => void;
471
449
  /**
472
450
  * Mark tests as skipped. All execution after this call will be skipped.
473
451
  * This function throws an error, so make sure you are not catching it accidentally.
474
452
  */
475
453
  skip: (note?: string) => void;
476
454
  }
477
- type ExtendedContext<T extends Test> = TaskContext<T> & TestContext;
478
- type OnTestFailedHandler = (result: TaskResult) => Awaitable<void>;
479
- type OnTestFinishedHandler = (result: TaskResult) => Awaitable<void>;
455
+ /**
456
+ * Context that's always available in the test function.
457
+ * @deprecated use `TestContext` instead
458
+ */
459
+ interface TaskContext extends TestContext {
460
+ }
461
+ /** @deprecated use `TestContext` instead */
462
+ type ExtendedContext = TaskContext & TestContext;
463
+ type OnTestFailedHandler = (context: TestContext) => Awaitable<void>;
464
+ type OnTestFinishedHandler = (context: TestContext) => Awaitable<void>;
480
465
  interface TaskHook<HookListener> {
481
466
  (fn: HookListener, timeout?: number): void;
482
467
  }
483
468
  type SequenceHooks = 'stack' | 'list' | 'parallel';
484
469
  type SequenceSetupFiles = 'list' | 'parallel';
485
470
 
486
- export { type AfterAllListener as A, type BeforeAllListener as B, type Custom as C, type DoneCallback as D, type ExtendedContext as E, type File as F, type TaskResultPack as G, type HookCleanupCallback as H, type InferFixturesTypes as I, type TaskState as J, type TestContext as K, type TestFunction as L, type TestOptions as M, type OnTestFailedHandler as O, type RunMode as R, type Suite as S, type Task as T, type Use as U, type Test as a, type ChainableFunction as b, createChainable as c, type BeforeEachListener as d, type AfterEachListener as e, type TaskHook as f, type OnTestFinishedHandler as g, type SuiteHooks as h, type SuiteAPI as i, type TestAPI as j, type SuiteCollector as k, type Fixture as l, type FixtureFn as m, type FixtureOptions as n, type Fixtures as o, type HookListener as p, type RuntimeContext as q, type SequenceHooks as r, type SequenceSetupFiles as s, type SuiteFactory as t, type TaskBase as u, type TaskContext as v, type TaskCustomOptions as w, type TaskMeta as x, type TaskPopulated as y, type TaskResult as z };
471
+ export { type AfterAllListener as A, type BeforeAllListener as B, type ChainableFunction as C, type DoneCallback as D, type ExtendedContext as E, type File as F, type TaskResultPack as G, type HookCleanupCallback as H, type InferFixturesTypes as I, type TaskState as J, type TestContext as K, type TestFunction as L, type TestOptions as M, type OnTestFailedHandler as O, type RunMode as R, type Suite as S, type Task as T, type Use as U, type Test as a, type BeforeEachListener as b, createChainable as c, type AfterEachListener as d, type TaskHook as e, type OnTestFinishedHandler as f, type Custom as g, type SuiteHooks as h, type SuiteAPI as i, type TestAPI as j, type SuiteCollector as k, type Fixture as l, type FixtureFn as m, type FixtureOptions as n, type Fixtures as o, type HookListener as p, type RuntimeContext as q, type SequenceHooks as r, type SequenceSetupFiles as s, type SuiteFactory as t, type TaskBase as u, type TaskContext as v, type TaskCustomOptions as w, type TaskMeta as x, type TaskPopulated as y, type TaskResult as z };
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DiffOptions } from '@vitest/utils/diff';
2
- import { r as SequenceHooks, s as SequenceSetupFiles, F as File, T as Task, a as Test, C as Custom, S as Suite, G as TaskResultPack, v as TaskContext, E as ExtendedContext } from './tasks-CgWT5bp6.js';
3
- export { A as AfterAllListener, e as AfterEachListener, B as BeforeAllListener, d as BeforeEachListener, j as CustomAPI, D as DoneCallback, l as Fixture, m as FixtureFn, n as FixtureOptions, o as Fixtures, H as HookCleanupCallback, p as HookListener, I as InferFixturesTypes, O as OnTestFailedHandler, g as OnTestFinishedHandler, R as RunMode, q as RuntimeContext, i as SuiteAPI, k as SuiteCollector, t as SuiteFactory, h as SuiteHooks, u as TaskBase, w as TaskCustomOptions, f as TaskHook, x as TaskMeta, y as TaskPopulated, z as TaskResult, J as TaskState, j as TestAPI, K as TestContext, L as TestFunction, M as TestOptions, U as Use } from './tasks-CgWT5bp6.js';
2
+ import { r as SequenceHooks, s as SequenceSetupFiles, F as File, T as Task, a as Test, S as Suite, G as TaskResultPack, K as TestContext } from './tasks-DaEhEbK_.js';
3
+ export { A as AfterAllListener, d as AfterEachListener, B as BeforeAllListener, b as BeforeEachListener, g as Custom, j as CustomAPI, D as DoneCallback, E as ExtendedContext, l as Fixture, m as FixtureFn, n as FixtureOptions, o as Fixtures, H as HookCleanupCallback, p as HookListener, I as InferFixturesTypes, O as OnTestFailedHandler, f as OnTestFinishedHandler, R as RunMode, q as RuntimeContext, i as SuiteAPI, k as SuiteCollector, t as SuiteFactory, h as SuiteHooks, u as TaskBase, v as TaskContext, w as TaskCustomOptions, e as TaskHook, x as TaskMeta, y as TaskPopulated, z as TaskResult, J as TaskState, j as TestAPI, L as TestFunction, M as TestOptions, U as Use } from './tasks-DaEhEbK_.js';
4
4
  import '@vitest/utils';
5
5
 
6
6
  /**
@@ -30,6 +30,13 @@ interface VitestRunnerConfig {
30
30
  includeTaskLocation?: boolean;
31
31
  diffOptions?: DiffOptions;
32
32
  }
33
+ /**
34
+ * Possible options to run a single file in a test.
35
+ */
36
+ interface FileSpecification {
37
+ filepath: string;
38
+ testLocations: number[] | undefined;
39
+ }
33
40
  type VitestRunnerImportSource = 'collect' | 'setup';
34
41
  interface VitestRunnerConstructor {
35
42
  new (config: VitestRunnerConfig): VitestRunner;
@@ -68,7 +75,7 @@ interface VitestRunner {
68
75
  /**
69
76
  * When the task has finished running, but before cleanup hooks are called
70
77
  */
71
- onTaskFinished?: (test: Test | Custom) => unknown;
78
+ onTaskFinished?: (test: Test) => unknown;
72
79
  /**
73
80
  * Called after result and state are set.
74
81
  */
@@ -114,11 +121,9 @@ interface VitestRunner {
114
121
  * Called when new context for a test is defined. Useful if you want to add custom properties to the context.
115
122
  * If you only want to define custom context, consider using "beforeAll" in "setupFiles" instead.
116
123
  *
117
- * This method is called for both "test" and "custom" handlers.
118
- *
119
- * @see https://vitest.dev/advanced/runner.html#your-task-function
124
+ * @see https://vitest.dev/advanced/runner#your-task-function
120
125
  */
121
- extendTaskContext?: <T extends Test>(context: TaskContext<T>) => ExtendedContext<T>;
126
+ extendTaskContext?: (context: TestContext) => TestContext;
122
127
  /**
123
128
  * Called when test and setup files are imported. Can be called in two situations: when collecting tests and when importing setup files.
124
129
  */
@@ -137,4 +142,4 @@ interface VitestRunner {
137
142
  pool?: string;
138
143
  }
139
144
 
140
- export { type CancelReason, Custom, ExtendedContext, File, SequenceHooks, SequenceSetupFiles, Suite, Task, TaskContext, TaskResultPack, Test, type VitestRunner, type VitestRunnerConfig, type VitestRunnerConstructor, type VitestRunnerImportSource };
145
+ export { type CancelReason, File, type FileSpecification, SequenceHooks, SequenceSetupFiles, Suite, Task, TaskResultPack, Test, TestContext, type VitestRunner, type VitestRunnerConfig, type VitestRunnerConstructor, type VitestRunnerImportSource };
package/dist/utils.d.ts CHANGED
@@ -1,15 +1,21 @@
1
- import { S as Suite, F as File, T as Task, a as Test, C as Custom } from './tasks-CgWT5bp6.js';
2
- export { b as ChainableFunction, c as createChainable } from './tasks-CgWT5bp6.js';
1
+ import { S as Suite, F as File, T as Task, a as Test } from './tasks-DaEhEbK_.js';
2
+ export { C as ChainableFunction, c as createChainable } from './tasks-DaEhEbK_.js';
3
3
  import { Arrayable } from '@vitest/utils';
4
4
 
5
5
  /**
6
6
  * If any tasks been marked as `only`, mark all other tasks as `skip`.
7
7
  */
8
- declare function interpretTaskModes(suite: Suite, namePattern?: string | RegExp, onlyMode?: boolean, parentIsOnly?: boolean, allowOnly?: boolean): void;
8
+ declare function interpretTaskModes(file: Suite, namePattern?: string | RegExp, testLocations?: number[] | undefined, onlyMode?: boolean, parentIsOnly?: boolean, allowOnly?: boolean): void;
9
9
  declare function someTasksAreOnly(suite: Suite): boolean;
10
10
  declare function generateHash(str: string): string;
11
11
  declare function calculateSuiteHash(parent: Suite): void;
12
12
  declare function createFileTask(filepath: string, root: string, projectName: string | undefined, pool?: string): File;
13
+ /**
14
+ * Generate a unique ID for a file based on its path and project name
15
+ * @param file File relative to the root of the project to keep ID the same between different machines
16
+ * @param projectName The name of the test project
17
+ */
18
+ declare function generateFileHash(file: string, projectName: string | undefined): string;
13
19
 
14
20
  /**
15
21
  * Return a function for running multiple async operations with limited concurrency.
@@ -24,8 +30,9 @@ declare function partitionSuiteChildren(suite: Suite): Task[][];
24
30
  /**
25
31
  * @deprecated use `isTestCase` instead
26
32
  */
27
- declare function isAtomTest(s: Task): s is Test | Custom;
28
- declare function getTests(suite: Arrayable<Task>): (Test | Custom)[];
33
+ declare function isAtomTest(s: Task): s is Test;
34
+ declare function isTestCase(s: Task): s is Test;
35
+ declare function getTests(suite: Arrayable<Task>): Test[];
29
36
  declare function getTasks(tasks?: Arrayable<Task>): Task[];
30
37
  declare function getSuites(suite: Arrayable<Task>): Suite[];
31
38
  declare function hasTests(suite: Arrayable<Suite>): boolean;
@@ -34,4 +41,4 @@ declare function getNames(task: Task): string[];
34
41
  declare function getFullName(task: Task, separator?: string): string;
35
42
  declare function getTestName(task: Task, separator?: string): string;
36
43
 
37
- export { calculateSuiteHash, createFileTask, generateHash, getFullName, getNames, getSuites, getTasks, getTestName, getTests, hasFailed, hasTests, interpretTaskModes, isAtomTest, limitConcurrency, partitionSuiteChildren, someTasksAreOnly };
44
+ export { calculateSuiteHash, createFileTask, generateFileHash, generateHash, getFullName, getNames, getSuites, getTasks, getTestName, getTests, hasFailed, hasTests, interpretTaskModes, isAtomTest, isTestCase, limitConcurrency, partitionSuiteChildren, someTasksAreOnly };
package/dist/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- export { a as calculateSuiteHash, c as createChainable, b as createFileTask, g as generateHash, d as getFullName, e as getNames, f as getSuites, h as getTasks, j as getTestName, k as getTests, m as hasFailed, n as hasTests, i as interpretTaskModes, o as isAtomTest, l as limitConcurrency, p as partitionSuiteChildren, s as someTasksAreOnly } from './chunk-tasks.js';
1
+ export { a as calculateSuiteHash, c as createChainable, b as createFileTask, g as generateFileHash, d as generateHash, e as getFullName, f as getNames, h as getSuites, j as getTasks, k as getTestName, m as getTests, n as hasFailed, o as hasTests, i as interpretTaskModes, q as isAtomTest, r as isTestCase, l as limitConcurrency, p as partitionSuiteChildren, s as someTasksAreOnly } from './chunk-tasks.js';
2
2
  import '@vitest/utils/error';
3
3
  import 'pathe';
4
4
  import '@vitest/utils';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/runner",
3
3
  "type": "module",
4
- "version": "2.2.0-beta.2",
4
+ "version": "3.0.0-beta.2",
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": "^1.1.2",
42
- "@vitest/utils": "2.2.0-beta.2"
42
+ "@vitest/utils": "3.0.0-beta.2"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "rimraf dist && rollup -c",