vitest 0.12.2 → 0.12.5

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.
Files changed (25) hide show
  1. package/LICENSE.md +72 -0
  2. package/dist/{chunk-api-setup.ed61899f.js → chunk-api-setup.62de6413.js} +4 -4
  3. package/dist/{chunk-constants.0567483c.js → chunk-constants.153353ee.js} +1 -1
  4. package/dist/{chunk-defaults.ecb46baf.js → chunk-defaults.374342ed.js} +1 -1
  5. package/dist/{chunk-install-pkg.73b84ae1.js → chunk-install-pkg.eb979c48.js} +11 -9
  6. package/dist/chunk-integrations-globals.4fea033a.js +25 -0
  7. package/dist/{chunk-runtime-chain.221b8dcb.js → chunk-runtime-chain.eb563278.js} +12 -9
  8. package/dist/{chunk-runtime-mocker.acd615bd.js → chunk-runtime-mocker.efd6b7ac.js} +3 -3
  9. package/dist/{chunk-runtime-rpc.63398738.js → chunk-runtime-rpc.ef131645.js} +1 -1
  10. package/dist/{chunk-utils-global.a5a8641f.js → chunk-utils-global.03413604.js} +29 -9
  11. package/dist/{chunk-utils-timers.f25e8f44.js → chunk-utils-timers.a0f0fe66.js} +1 -1
  12. package/dist/{chunk-vite-node-externalize.2c1fbe22.js → chunk-vite-node-externalize.8560ca65.js} +67 -52
  13. package/dist/{chunk-vite-node-utils.1536f168.js → chunk-vite-node-utils.1064f66b.js} +1067 -3
  14. package/dist/cli.js +7 -8
  15. package/dist/entry.js +6 -10
  16. package/dist/index.d.ts +9 -2
  17. package/dist/index.js +4 -5
  18. package/dist/node.d.ts +9 -2
  19. package/dist/node.js +10 -11
  20. package/dist/{vendor-entry.3adaf0b2.js → vendor-entry.5b810598.js} +21 -13
  21. package/dist/{vendor-index.40be925a.js → vendor-index.4e550a2c.js} +5 -5
  22. package/dist/worker.js +5 -5
  23. package/package.json +3 -3
  24. package/dist/chunk-integrations-globals.60fc66ef.js +0 -29
  25. package/dist/vendor-_commonjsHelpers.addc3445.js +0 -3
@@ -2,28 +2,27 @@ import { Buffer } from 'buffer';
2
2
  import path$a from 'path';
3
3
  import childProcess from 'child_process';
4
4
  import process$1 from 'process';
5
- import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn, o as onetime$1 } from './vendor-index.40be925a.js';
5
+ import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn, o as onetime$1 } from './vendor-index.4e550a2c.js';
6
6
  import url, { fileURLToPath, pathToFileURL } from 'url';
7
7
  import require$$0, { constants as constants$5, cpus, hostname } from 'os';
8
- import { j as join, f as basename, d as dirname, h as resolve, p as picocolors, s as slash$2, k as isAbsolute, l as relative, m as getTests, o as getFullName, q as hasFailed, u as hasFailedSnapshot, v as getSuites, t as toArray, w as normalize, n as noop$1, x as deepMerge, y as toNamespacedPath, g as getCallLastIndex, e as notNullish, z as ensurePackageInstalled, A as stdout } from './chunk-utils-global.a5a8641f.js';
8
+ import { c as commonjsGlobal, j as join, h as basename, d as dirname, k as resolve, p as picocolors, s as slash$2, l as isAbsolute, m as relative, o as getTests, q as getFullName, u as hasFailed, v as hasFailedSnapshot, w as getSuites, t as toArray, x as normalize, n as noop$1, y as deepMerge, z as toNamespacedPath, g as getCallLastIndex, f as notNullish, A as ensurePackageInstalled, B as stdout } from './chunk-utils-global.03413604.js';
9
9
  import { createServer, mergeConfig } from 'vite';
10
10
  import fs$8, { promises, existsSync, readFileSync } from 'fs';
11
- import { d as distDir, a as defaultPort, c as configFiles } from './chunk-constants.0567483c.js';
11
+ import { d as distDir, a as defaultPort, c as configFiles } from './chunk-constants.153353ee.js';
12
12
  import readline from 'readline';
13
- import require$$0$1 from 'util';
14
- import require$$0$2 from 'stream';
13
+ import require$$1 from 'util';
14
+ import require$$0$1 from 'stream';
15
15
  import require$$2 from 'events';
16
- import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
17
- import { i as isNodeBuiltin, a as isValidNodeImport, s as slash$1, t as toFilePath, w as withInlineSourcemap, c as createBirpc, V as ViteNodeRunner } from './chunk-vite-node-utils.1536f168.js';
18
- import { c as configDefaults, r as resolveC8Options, a as cleanCoverage, b as reportCoverage } from './chunk-defaults.ecb46baf.js';
16
+ import { i as isNodeBuiltin, a as isValidNodeImport, s as slash$1, c as createDebug, t as toFilePath, w as withInlineSourcemap, b as createBirpc, V as ViteNodeRunner } from './chunk-vite-node-utils.1064f66b.js';
17
+ import { c as configDefaults, r as resolveC8Options, a as cleanCoverage, b as reportCoverage } from './chunk-defaults.374342ed.js';
19
18
  import { MessageChannel } from 'worker_threads';
20
19
  import { Tinypool } from 'tinypool';
21
20
  import { performance } from 'perf_hooks';
22
- import { e as stripAnsi, h as stringWidth, i as ansiStyles, j as sliceAnsi, k as setInterval, o as clearInterval, q as cliTruncate, c as setTimeout$1, b as parseStacktrace, r as interpretSourcePos, s as stringify$5, u as unifiedDiff, a as posToNumber, l as lineSplitRE, d as clearTimeout$1 } from './chunk-utils-timers.f25e8f44.js';
21
+ import { e as stripAnsi, h as stringWidth, i as ansiStyles, j as sliceAnsi, k as setInterval, o as clearInterval, q as cliTruncate, c as setTimeout$1, b as parseStacktrace, r as interpretSourcePos, s as stringify$5, u as unifiedDiff, a as posToNumber, l as lineSplitRE, d as clearTimeout$1 } from './chunk-utils-timers.a0f0fe66.js';
23
22
  import MagicString from './chunk-magic-string.d5e0e473.js';
24
23
  import { p as prompts } from './vendor-index.405e58ef.js';
25
24
 
26
- var version = "0.12.2";
25
+ var version = "0.12.5";
27
26
 
28
27
  function stripFinalNewline(input) {
29
28
  const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
@@ -2128,7 +2127,7 @@ var toRegexRange_1 = toRegexRange$1;
2128
2127
  * Licensed under the MIT License.
2129
2128
  */
2130
2129
 
2131
- const util$1 = require$$0$1;
2130
+ const util$1 = require$$1;
2132
2131
  const toRegexRange = toRegexRange_1;
2133
2132
 
2134
2133
  const isObject$1 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
@@ -5165,7 +5164,7 @@ var picomatch_1 = picomatch$1;
5165
5164
  module.exports = picomatch_1;
5166
5165
  } (picomatch$2));
5167
5166
 
5168
- const util = require$$0$1;
5167
+ const util = require$$1;
5169
5168
  const braces = braces_1;
5170
5169
  const picomatch = picomatch$2.exports;
5171
5170
  const utils$b = utils$f;
@@ -5809,7 +5808,7 @@ var stream$4 = {};
5809
5808
  * Copyright (c) 2014-2020 Teambition
5810
5809
  * Licensed under the MIT license.
5811
5810
  */
5812
- const Stream = require$$0$2;
5811
+ const Stream = require$$0$1;
5813
5812
  const PassThrough = Stream.PassThrough;
5814
5813
  const slice = Array.prototype.slice;
5815
5814
 
@@ -7093,7 +7092,7 @@ function callSuccessCallback(callback, entries) {
7093
7092
  var stream$1 = {};
7094
7093
 
7095
7094
  Object.defineProperty(stream$1, "__esModule", { value: true });
7096
- const stream_1$5 = require$$0$2;
7095
+ const stream_1$5 = require$$0$1;
7097
7096
  const async_1$2 = async$2;
7098
7097
  class StreamProvider {
7099
7098
  constructor(_root, _settings) {
@@ -7301,7 +7300,7 @@ class Reader {
7301
7300
  reader.default = Reader;
7302
7301
 
7303
7302
  Object.defineProperty(stream$2, "__esModule", { value: true });
7304
- const stream_1$3 = require$$0$2;
7303
+ const stream_1$3 = require$$0$1;
7305
7304
  const fsStat$1 = out$3;
7306
7305
  const fsWalk$1 = out$2;
7307
7306
  const reader_1$1 = reader;
@@ -7699,7 +7698,7 @@ async$6.default = ProviderAsync;
7699
7698
  var stream = {};
7700
7699
 
7701
7700
  Object.defineProperty(stream, "__esModule", { value: true });
7702
- const stream_1$1 = require$$0$2;
7701
+ const stream_1$1 = require$$0$1;
7703
7702
  const stream_2 = stream$2;
7704
7703
  const provider_1$1 = provider;
7705
7704
  class ProviderStream extends provider_1$1.default {
@@ -8012,8 +8011,8 @@ function patchWindowsImportPath(path) {
8012
8011
  }
8013
8012
 
8014
8013
  var __defProp$5 = Object.defineProperty;
8015
- var __defProps$4 = Object.defineProperties;
8016
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
8014
+ var __defProps$5 = Object.defineProperties;
8015
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
8017
8016
  var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
8018
8017
  var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
8019
8018
  var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
@@ -8029,7 +8028,8 @@ var __spreadValues$5 = (a, b) => {
8029
8028
  }
8030
8029
  return a;
8031
8030
  };
8032
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
8031
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
8032
+ const debugRequest = createDebug("vite-node:server:request");
8033
8033
  const RealDate = Date;
8034
8034
  class ViteNodeServer {
8035
8035
  constructor(server, options = {}) {
@@ -8050,7 +8050,7 @@ class ViteNodeServer {
8050
8050
  async fetchModule(id) {
8051
8051
  if (!this.fetchPromiseMap.has(id)) {
8052
8052
  this.fetchPromiseMap.set(id, this._fetchModule(id).then((r) => {
8053
- return this.options.sourcemap !== true ? __spreadProps$4(__spreadValues$5({}, r), { map: void 0 }) : r;
8053
+ return this.options.sourcemap !== true ? __spreadProps$5(__spreadValues$5({}, r), { map: void 0 }) : r;
8054
8054
  }).finally(() => {
8055
8055
  this.fetchPromiseMap.delete(id);
8056
8056
  }));
@@ -8098,6 +8098,7 @@ class ViteNodeServer {
8098
8098
  return result;
8099
8099
  }
8100
8100
  async _transformRequest(id) {
8101
+ debugRequest(id);
8101
8102
  let result = null;
8102
8103
  if (this.getTransformMode(id) === "web") {
8103
8104
  result = await this.server.transformRequest(id);
@@ -8189,7 +8190,7 @@ function createFakePool(ctx) {
8189
8190
  const { workerPort, port } = createChannel(ctx);
8190
8191
  const data = {
8191
8192
  port: workerPort,
8192
- config: ctx.getConfig(),
8193
+ config: ctx.getSerializableConfig(),
8193
8194
  files,
8194
8195
  invalidates,
8195
8196
  id: 1
@@ -8209,7 +8210,7 @@ function createWorkerPool(ctx) {
8209
8210
  const threadsCount = ctx.config.watch ? Math.max(cpus().length / 2, 1) : Math.max(cpus().length - 1, 1);
8210
8211
  const options = {
8211
8212
  filename: workerPath,
8212
- useAtomics: typeof process.versions.webcontainer !== "string",
8213
+ useAtomics: false,
8213
8214
  maxThreads: ctx.config.maxThreads ?? threadsCount,
8214
8215
  minThreads: ctx.config.minThreads ?? threadsCount
8215
8216
  };
@@ -8221,11 +8222,12 @@ function createWorkerPool(ctx) {
8221
8222
  const runWithFiles = (name) => {
8222
8223
  return async (files, invalidates) => {
8223
8224
  let id = 0;
8225
+ const config = ctx.getSerializableConfig();
8224
8226
  await Promise.all(files.map(async (file) => {
8225
8227
  const { workerPort, port } = createChannel(ctx);
8226
8228
  const data = {
8227
8229
  port: workerPort,
8228
- config: ctx.getConfig(),
8230
+ config,
8229
8231
  files: [file],
8230
8232
  invalidates,
8231
8233
  id: ++id
@@ -8553,13 +8555,22 @@ ${picocolors.exports.inverse(picocolors.exports.bold(picocolors.exports.blue(" R
8553
8555
  this.start = performance.now();
8554
8556
  }
8555
8557
  onUserConsoleLog(log) {
8556
- if (this.ctx.config.silent)
8558
+ if (!this.shouldLog(log))
8557
8559
  return;
8558
8560
  const task = log.taskId ? this.ctx.state.idMap.get(log.taskId) : void 0;
8559
8561
  this.ctx.log(picocolors.exports.gray(log.type + picocolors.exports.dim(` | ${task ? getFullName(task) : "unknown test"}`)));
8560
8562
  process[log.type].write(`${log.content}
8561
8563
  `);
8562
8564
  }
8565
+ shouldLog(log) {
8566
+ var _a, _b;
8567
+ if (this.ctx.config.silent)
8568
+ return false;
8569
+ const shouldIgnore = (_b = (_a = this.ctx.config).onConsoleLog) == null ? void 0 : _b.call(_a, log.content, log.type);
8570
+ if (shouldIgnore === false)
8571
+ return shouldIgnore;
8572
+ return true;
8573
+ }
8563
8574
  onServerRestart() {
8564
8575
  this.ctx.log(picocolors.exports.cyan("Restarted due to config changes..."));
8565
8576
  }
@@ -8637,6 +8648,7 @@ ${picocolors.exports.inverse(picocolors.exports.bold(picocolors.exports.blue(" R
8637
8648
  }
8638
8649
  await this.ctx.printError(error);
8639
8650
  errorDivider();
8651
+ await Promise.resolve();
8640
8652
  }
8641
8653
  }
8642
8654
  registerUnhandledRejection() {
@@ -9278,6 +9290,8 @@ class DefaultReporter extends BaseReporter {
9278
9290
  }
9279
9291
  onUserConsoleLog(log) {
9280
9292
  var _a;
9293
+ if (!this.shouldLog(log))
9294
+ return;
9281
9295
  (_a = this.renderer) == null ? void 0 : _a.clear();
9282
9296
  super.onUserConsoleLog(log);
9283
9297
  }
@@ -9619,8 +9633,8 @@ class TapReporter {
9619
9633
  }
9620
9634
 
9621
9635
  var __defProp$4 = Object.defineProperty;
9622
- var __defProps$3 = Object.defineProperties;
9623
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
9636
+ var __defProps$4 = Object.defineProperties;
9637
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
9624
9638
  var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
9625
9639
  var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
9626
9640
  var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
@@ -9636,13 +9650,13 @@ var __spreadValues$4 = (a, b) => {
9636
9650
  }
9637
9651
  return a;
9638
9652
  };
9639
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
9653
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
9640
9654
  function flattenTasks$1(task, baseName = "") {
9641
9655
  const base = baseName ? `${baseName} > ` : "";
9642
9656
  if (task.type === "suite") {
9643
9657
  return task.tasks.flatMap((child) => flattenTasks$1(child, `${base}${task.name}`));
9644
9658
  } else {
9645
- return [__spreadProps$3(__spreadValues$4({}, task), {
9659
+ return [__spreadProps$4(__spreadValues$4({}, task), {
9646
9660
  name: `${base}${task.name}`
9647
9661
  })];
9648
9662
  }
@@ -9760,7 +9774,7 @@ class JUnitReporter {
9760
9774
  failures: 0,
9761
9775
  skipped: 0
9762
9776
  });
9763
- return __spreadProps$3(__spreadValues$4({}, file), {
9777
+ return __spreadProps$4(__spreadValues$4({}, file), {
9764
9778
  tasks,
9765
9779
  stats
9766
9780
  });
@@ -9787,8 +9801,8 @@ class JUnitReporter {
9787
9801
  }
9788
9802
 
9789
9803
  var __defProp$3 = Object.defineProperty;
9790
- var __defProps$2 = Object.defineProperties;
9791
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
9804
+ var __defProps$3 = Object.defineProperties;
9805
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
9792
9806
  var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
9793
9807
  var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
9794
9808
  var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
@@ -9804,13 +9818,13 @@ var __spreadValues$3 = (a, b) => {
9804
9818
  }
9805
9819
  return a;
9806
9820
  };
9807
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
9821
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
9808
9822
  function flattenTasks(task, baseName = "") {
9809
9823
  const base = baseName ? `${baseName} > ` : "";
9810
9824
  if (task.type === "suite" && task.tasks.length > 0) {
9811
9825
  return task.tasks.flatMap((child) => flattenTasks(child, `${base}${task.name}`));
9812
9826
  } else {
9813
- return [__spreadProps$2(__spreadValues$3({}, task), {
9827
+ return [__spreadProps$3(__spreadValues$3({}, task), {
9814
9828
  name: `${base}${task.name}`
9815
9829
  })];
9816
9830
  }
@@ -9927,8 +9941,8 @@ class StateManager {
9927
9941
  }
9928
9942
 
9929
9943
  var __defProp$2 = Object.defineProperty;
9930
- var __defProps$1 = Object.defineProperties;
9931
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
9944
+ var __defProps$2 = Object.defineProperties;
9945
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
9932
9946
  var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
9933
9947
  var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
9934
9948
  var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
@@ -9944,7 +9958,7 @@ var __spreadValues$2 = (a, b) => {
9944
9958
  }
9945
9959
  return a;
9946
9960
  };
9947
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
9961
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
9948
9962
  const extraInlineDeps = [
9949
9963
  /^(?!.*(?:node_modules)).*\.mjs$/,
9950
9964
  /^(?!.*(?:node_modules)).*\.cjs\.js$/,
@@ -9987,7 +10001,7 @@ function resolveConfig(options, viteConfig) {
9987
10001
  }
9988
10002
  options.environment = "happy-dom";
9989
10003
  }
9990
- const resolved = __spreadProps$1(__spreadValues$2(__spreadValues$2({}, configDefaults), options), {
10004
+ const resolved = __spreadProps$2(__spreadValues$2(__spreadValues$2({}, configDefaults), options), {
9991
10005
  root: viteConfig.root
9992
10006
  });
9993
10007
  if (viteConfig.base !== "/")
@@ -10103,7 +10117,7 @@ function handleImportOutsideModuleError(stack, ctx) {
10103
10117
  name = name.split("/").slice(0, 2).join("/");
10104
10118
  else
10105
10119
  name = name.split("/")[0];
10106
- ctx.console.error(picocolors.exports.yellow(`Module ${path} seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package ${picocolors.exports.bold(`"${name}"`)} asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
10120
+ ctx.error(picocolors.exports.yellow(`Module ${path} seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package ${picocolors.exports.bold(`"${name}"`)} asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
10107
10121
 
10108
10122
  As a temporary workaround you can try to inline the package by updating your config:
10109
10123
 
@@ -10246,6 +10260,8 @@ class VitestGit {
10246
10260
  }
10247
10261
 
10248
10262
  var __defProp$1 = Object.defineProperty;
10263
+ var __defProps$1 = Object.defineProperties;
10264
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
10249
10265
  var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
10250
10266
  var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
10251
10267
  var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
@@ -10261,6 +10277,7 @@ var __spreadValues$1 = (a, b) => {
10261
10277
  }
10262
10278
  return a;
10263
10279
  };
10280
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
10264
10281
  const WATCHER_DEBOUNCE = 100;
10265
10282
  const CLOSE_TIMEOUT = 1e3;
10266
10283
  class Vitest {
@@ -10314,18 +10331,14 @@ class Vitest {
10314
10331
  if (resolved.coverage.enabled)
10315
10332
  await cleanCoverage(resolved.coverage, resolved.coverage.clean);
10316
10333
  }
10317
- getConfig() {
10318
- const hasCustomReporter = toArray(this.config.reporters).some((reporter) => typeof reporter !== "string");
10319
- if (this.config.snapshotOptions.resolveSnapshotPath)
10320
- this.config.snapshotOptions.resolveSnapshotPath = void 0;
10321
- if (!hasCustomReporter && !this.configOverride)
10322
- return this.config;
10323
- const config = deepMerge({}, this.config);
10324
- if (this.configOverride)
10325
- deepMerge(config, this.configOverride);
10326
- if (hasCustomReporter)
10327
- config.reporters = [];
10328
- return config;
10334
+ getSerializableConfig() {
10335
+ return deepMerge(__spreadProps$1(__spreadValues$1({}, this.config), {
10336
+ reporters: [],
10337
+ snapshotOptions: __spreadProps$1(__spreadValues$1({}, this.config.snapshotOptions), {
10338
+ resolveSnapshotPath: void 0
10339
+ }),
10340
+ onConsoleLog: void 0
10341
+ }), this.configOverride || {});
10329
10342
  }
10330
10343
  async start(filters) {
10331
10344
  await this.report("onInit", this);
@@ -10429,7 +10442,7 @@ class Vitest {
10429
10442
  this.config.testNamePattern = pattern ? new RegExp(pattern) : void 0;
10430
10443
  await this.rerunFiles(files, trigger);
10431
10444
  }
10432
- async returnFailed() {
10445
+ async rerunFailed() {
10433
10446
  await this.rerunFiles(this.state.getFailedFilepaths(), "rerun failed");
10434
10447
  }
10435
10448
  async updateSnapshot(files) {
@@ -10936,7 +10949,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest()) {
10936
10949
  await ctx.setServer(options, server);
10937
10950
  haveStarted = true;
10938
10951
  if (options.api && options.watch)
10939
- (await import('./chunk-api-setup.ed61899f.js')).setup(ctx);
10952
+ (await import('./chunk-api-setup.62de6413.js')).setup(ctx);
10940
10953
  if (!options.watch)
10941
10954
  await server.watcher.close();
10942
10955
  }
@@ -10993,6 +11006,8 @@ function registerConsoleShortcuts(ctx) {
10993
11006
  return ctx.updateSnapshot();
10994
11007
  if (name === "a" || name === "return")
10995
11008
  return ctx.rerunFiles(void 0, "rerun all");
11009
+ if (name === "f")
11010
+ return ctx.rerunFailed();
10996
11011
  if (name === "t")
10997
11012
  return inputNamePattern();
10998
11013
  if (name === "q")