vitest 3.0.9 → 3.1.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.
@@ -618,7 +618,7 @@ class CAC extends EventEmitter {
618
618
 
619
619
  const cac = (name = "") => new CAC(name);
620
620
 
621
- var version = "3.0.9";
621
+ var version = "3.1.0-beta.1";
622
622
 
623
623
  const apiConfig = (port) => ({
624
624
  port: {
@@ -726,7 +726,8 @@ const cliOptionsConfig = {
726
726
  subcommands: apiConfig(defaultPort)
727
727
  },
728
728
  silent: {
729
- description: "Silent console output from tests"
729
+ description: "Silent console output from tests. Use `'passed-only'` to see logs from failing tests only.",
730
+ argument: "[value]"
730
731
  },
731
732
  hideSkippedTests: {
732
733
  description: "Hide logs for skipped tests"
@@ -1169,6 +1170,10 @@ const cliOptionsConfig = {
1169
1170
  printBasicPrototype: {
1170
1171
  description: "Print basic prototype Object and Array (default: `true`)"
1171
1172
  },
1173
+ maxDepth: {
1174
+ description: "Limit the depth to recurse when printing nested objects (default: `20`)",
1175
+ argument: "<maxDepth>"
1176
+ },
1172
1177
  truncateThreshold: {
1173
1178
  description: "Number of lines to show before and after each change (default: `0`)",
1174
1179
  argument: "<threshold>"
@@ -1591,7 +1596,7 @@ async function start(mode, cliFilters, options) {
1591
1596
  } catch {
1592
1597
  }
1593
1598
  try {
1594
- const { startVitest } = await import('./cli-api.Ckwz_xSb.js').then(function (n) { return n.f; });
1599
+ const { startVitest } = await import('./cli-api.BwkkJsRe.js').then(function (n) { return n.f; });
1595
1600
  const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1596
1601
  if (!ctx.shouldKeepServer()) {
1597
1602
  await ctx.exit();
@@ -1622,7 +1627,7 @@ async function collect(mode, cliFilters, options) {
1622
1627
  } catch {
1623
1628
  }
1624
1629
  try {
1625
- const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.Ckwz_xSb.js').then(function (n) { return n.f; });
1630
+ const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.BwkkJsRe.js').then(function (n) { return n.f; });
1626
1631
  const ctx = await prepareVitest(mode, {
1627
1632
  ...normalizeCliOptions(cliFilters, options),
1628
1633
  watch: false,
@@ -11,9 +11,9 @@ import { generateFileHash, createFileTask, limitConcurrency, hasFailed, getTasks
11
11
  import { SnapshotManager } from '@vitest/snapshot/manager';
12
12
  import { ViteNodeRunner } from 'vite-node/client';
13
13
  import { ViteNodeServer } from 'vite-node/server';
14
- import { v as version$1 } from './cac.CeVHgzve.js';
14
+ import { v as version$1 } from './cac.BjmXy7OV.js';
15
15
  import { c as createBirpc } from './index.68735LiX.js';
16
- import { p as parse, s as stringify, g as printError, h as generateCodeFrame, b as BenchmarkReportsMap, R as ReportersMap, i as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.B8tIoLPT.js';
16
+ import { p as parse, s as stringify, g as printError, h as generateCodeFrame, b as BenchmarkReportsMap, R as ReportersMap, i as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.DOyx6FYJ.js';
17
17
  import require$$0$3 from 'events';
18
18
  import require$$1$1 from 'https';
19
19
  import require$$2 from 'http';
@@ -630,6 +630,28 @@ class BaseReporter {
630
630
  this.reportSummary(files, errors);
631
631
  }
632
632
  }
633
+ onTestCaseResult(testCase) {
634
+ if (testCase.result().state === "failed") {
635
+ this.logFailedTask(testCase.task);
636
+ }
637
+ }
638
+ onTestSuiteResult(testSuite) {
639
+ if (testSuite.state() === "failed") {
640
+ this.logFailedTask(testSuite.task);
641
+ }
642
+ }
643
+ onTestModuleEnd(testModule) {
644
+ if (testModule.state() === "failed") {
645
+ this.logFailedTask(testModule.task);
646
+ }
647
+ }
648
+ logFailedTask(task) {
649
+ if (this.ctx.config.silent === "passed-only") {
650
+ for (const log of task.logs || []) {
651
+ this.onUserConsoleLog(log, "failed");
652
+ }
653
+ }
654
+ }
633
655
  onTaskUpdate(packs) {
634
656
  for (const pack of packs) {
635
657
  const task = this.ctx.state.idMap.get(pack[0]);
@@ -676,7 +698,7 @@ class BaseReporter {
676
698
  for (const test of tests) {
677
699
  const { duration, retryCount, repeatCount } = test.result || {};
678
700
  const padding = this.getTestIndentation(test);
679
- let suffix2 = "";
701
+ let suffix2 = this.getDurationPrefix(test);
680
702
  if (retryCount != null && retryCount > 0) {
681
703
  suffix2 += c.yellow(` (retry x${retryCount})`);
682
704
  }
@@ -684,7 +706,7 @@ class BaseReporter {
684
706
  suffix2 += c.yellow(` (repeat x${repeatCount})`);
685
707
  }
686
708
  if (test.result?.state === "fail") {
687
- this.log(c.red(` ${padding}${taskFail} ${this.getTestName(test, c.dim(" > "))}${this.getDurationPrefix(test)}`) + suffix2);
709
+ this.log(c.red(` ${padding}${taskFail} ${this.getTestName(test, c.dim(" > "))}`) + suffix2);
688
710
  test.result?.errors?.forEach((error) => {
689
711
  const message = this.formatShortError(error);
690
712
  if (message) {
@@ -692,9 +714,7 @@ class BaseReporter {
692
714
  }
693
715
  });
694
716
  } else if (duration && duration > this.ctx.config.slowTestThreshold) {
695
- this.log(
696
- ` ${padding}${c.yellow(c.dim(F_CHECK))} ${this.getTestName(test, c.dim(" > "))} ${c.yellow(Math.round(duration) + c.dim("ms"))}${suffix2}`
697
- );
717
+ this.log(` ${padding}${c.yellow(c.dim(F_CHECK))} ${this.getTestName(test, c.dim(" > "))} ${suffix2}`);
698
718
  } else if (this.ctx.config.hideSkippedTests && (test.mode === "skip" || test.result?.state === "skip")) ; else if (test.result?.state === "skip" && test.result.note) {
699
719
  this.log(` ${padding}${getStateSymbol(test)} ${this.getTestName(test)}${c.dim(c.gray(` [${test.result.note}]`))}`);
700
720
  } else if (this.renderSucceed || failed.length > 0) {
@@ -718,7 +738,7 @@ class BaseReporter {
718
738
  if (!task.result?.duration) {
719
739
  return "";
720
740
  }
721
- const color = task.result.duration > this.ctx.config.slowTestThreshold ? c.yellow : c.gray;
741
+ const color = task.result.duration > this.ctx.config.slowTestThreshold ? c.yellow : c.green;
722
742
  return color(` ${Math.round(task.result.duration)}${c.dim("ms")}`);
723
743
  }
724
744
  onWatcherStart(files = this.ctx.state.getFiles(), errors = this.ctx.state.getUnhandledErrors()) {
@@ -770,8 +790,8 @@ class BaseReporter {
770
790
  this._timeStart = formatTimeString(/* @__PURE__ */ new Date());
771
791
  this.start = performance$1.now();
772
792
  }
773
- onUserConsoleLog(log) {
774
- if (!this.shouldLog(log)) {
793
+ onUserConsoleLog(log, taskState) {
794
+ if (!this.shouldLog(log, taskState)) {
775
795
  return;
776
796
  }
777
797
  const output = log.type === "stdout" ? this.ctx.logger.outputStream : this.ctx.logger.errorStream;
@@ -809,8 +829,11 @@ class BaseReporter {
809
829
  this.log(c.yellow("Test removed...") + (trigger ? c.dim(` [ ${this.relative(trigger)} ]
810
830
  `) : ""));
811
831
  }
812
- shouldLog(log) {
813
- if (this.ctx.config.silent) {
832
+ shouldLog(log, taskState) {
833
+ if (this.ctx.config.silent === true) {
834
+ return false;
835
+ }
836
+ if (this.ctx.config.silent === "passed-only" && taskState !== "failed") {
814
837
  return false;
815
838
  }
816
839
  const shouldLog = this.ctx.config.onConsoleLog?.(log.content, log.type);
@@ -1433,12 +1456,14 @@ class DefaultReporter extends BaseReporter {
1433
1456
  this.summary?.onTestModuleCollected(module);
1434
1457
  }
1435
1458
  onTestModuleEnd(module) {
1459
+ super.onTestModuleEnd(module);
1436
1460
  this.summary?.onTestModuleEnd(module);
1437
1461
  }
1438
1462
  onTestCaseReady(test) {
1439
1463
  this.summary?.onTestCaseReady(test);
1440
1464
  }
1441
1465
  onTestCaseResult(test) {
1466
+ super.onTestCaseResult(test);
1442
1467
  this.summary?.onTestCaseResult(test);
1443
1468
  }
1444
1469
  onHookStart(hook) {
@@ -1512,11 +1537,13 @@ class DotReporter extends BaseReporter {
1512
1537
  this.renderer?.schedule();
1513
1538
  }
1514
1539
  onTestCaseResult(test) {
1540
+ super.onTestCaseResult(test);
1515
1541
  this.finishedTests.add(test.id);
1516
1542
  this.tests.set(test.id, test.result().state || "skipped");
1517
1543
  this.renderer?.schedule();
1518
1544
  }
1519
- onTestModuleEnd() {
1545
+ onTestModuleEnd(testModule) {
1546
+ super.onTestModuleEnd(testModule);
1520
1547
  if (!this.isTTY) {
1521
1548
  return;
1522
1549
  }
@@ -2189,15 +2216,12 @@ class VerboseReporter extends DefaultReporter {
2189
2216
  if (task.type !== "test" || !task.result?.state || task.result?.state === "run" || task.result?.state === "queued") {
2190
2217
  return;
2191
2218
  }
2192
- const duration = task.result.duration;
2193
2219
  let title = ` ${getStateSymbol(task)} `;
2194
2220
  if (task.file.projectName) {
2195
2221
  title += formatProjectName(task.file.projectName);
2196
2222
  }
2197
2223
  title += getFullName(task, c.dim(" > "));
2198
- if (duration != null && duration > this.ctx.config.slowTestThreshold) {
2199
- title += c.yellow(` ${Math.round(duration)}${c.dim("ms")}`);
2200
- }
2224
+ title += super.getDurationPrefix(task);
2201
2225
  if (this.ctx.config.logHeapUsage && task.result.heap != null) {
2202
2226
  title += c.magenta(` ${Math.floor(task.result.heap / 1024 / 1024)} MB heap used`);
2203
2227
  }
@@ -2378,8 +2402,9 @@ ${padding}`;
2378
2402
  if (task.mode === "skip" || task.mode === "todo") {
2379
2403
  suffix += c.dim(c.gray(" [skipped]"));
2380
2404
  }
2381
- if (duration != null && duration > options.slowTestThreshold) {
2382
- suffix += c.yellow(` ${Math.round(duration)}${c.dim("ms")}`);
2405
+ if (duration != null) {
2406
+ const color = duration > options.slowTestThreshold ? c.yellow : c.green;
2407
+ suffix += color(` ${Math.round(duration)}${c.dim("ms")}`);
2383
2408
  }
2384
2409
  if (options.showHeap && task.result?.heap != null) {
2385
2410
  suffix += c.magenta(` ${Math.floor(task.result.heap / 1024 / 1024)} MB heap used`);
@@ -639,6 +639,10 @@ declare abstract class BaseReporter implements Reporter {
639
639
  error(...messages: any): void;
640
640
  relative(path: string): string;
641
641
  onFinished(files?: File[], errors?: unknown[]): void;
642
+ onTestCaseResult(testCase: TestCase): void;
643
+ onTestSuiteResult(testSuite: TestSuite): void;
644
+ onTestModuleEnd(testModule: TestModule): void;
645
+ private logFailedTask;
642
646
  onTaskUpdate(packs: TaskResultPack[]): void;
643
647
  /**
644
648
  * Callback invoked with a single `Task` from `onTaskUpdate`
@@ -648,12 +652,12 @@ declare abstract class BaseReporter implements Reporter {
648
652
  protected getTestName(test: Task, separator?: string): string;
649
653
  protected formatShortError(error: ErrorWithDiff): string;
650
654
  protected getTestIndentation(_test: Task): string;
651
- private getDurationPrefix;
655
+ protected getDurationPrefix(task: Task): string;
652
656
  onWatcherStart(files?: File[], errors?: unknown[]): void;
653
657
  onWatcherRerun(files: string[], trigger?: string): void;
654
- onUserConsoleLog(log: UserConsoleLog): void;
658
+ onUserConsoleLog(log: UserConsoleLog, taskState?: TestResult["state"]): void;
655
659
  onTestRemoved(trigger?: string): void;
656
- shouldLog(log: UserConsoleLog): boolean;
660
+ shouldLog(log: UserConsoleLog, taskState?: TestResult["state"]): boolean;
657
661
  onServerRestart(reason?: string): void;
658
662
  reportSummary(files: File[], errors: unknown[]): void;
659
663
  reportTestSummary(files: File[], errors: unknown[]): void;
@@ -917,7 +921,7 @@ declare class DotReporter extends BaseReporter {
917
921
  onTestModuleCollected(module: TestModule): void;
918
922
  onTestCaseReady(test: TestCase): void;
919
923
  onTestCaseResult(test: TestCase): void;
920
- onTestModuleEnd(): void;
924
+ onTestModuleEnd(testModule: TestModule): void;
921
925
  private createSummary;
922
926
  }
923
927
 
@@ -1726,9 +1730,11 @@ interface InlineConfig {
1726
1730
  /**
1727
1731
  * Silent mode
1728
1732
  *
1733
+ * Use `'passed-only'` to see logs from failing tests only.
1734
+ *
1729
1735
  * @default false
1730
1736
  */
1731
- silent?: boolean;
1737
+ silent?: boolean | "passed-only";
1732
1738
  /**
1733
1739
  * Hide logs for skipped tests
1734
1740
  *
@@ -1,4 +1,4 @@
1
- import { I as InlineConfig } from './reporters.d.CqBhtcTq.js';
1
+ import { I as InlineConfig } from './reporters.d.r7poTZjA.js';
2
2
 
3
3
  type VitestInlineConfig = InlineConfig;
4
4
  declare module "vite" {
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as createCLI } from './chunks/cac.CeVHgzve.js';
1
+ import { c as createCLI } from './chunks/cac.BjmXy7OV.js';
2
2
  import '@vitest/utils';
3
3
  import 'events';
4
4
  import 'pathe';
package/dist/config.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
2
2
  export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
3
- import { b as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, c as UserProjectConfigFn, d as UserProjectConfigExport, T as TestProjectConfiguration } from './chunks/reporters.d.CqBhtcTq.js';
4
- export { W as WorkspaceProjectConfiguration } from './chunks/reporters.d.CqBhtcTq.js';
5
- import './chunks/vite.d.BUZTGxQ3.js';
3
+ import { b as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, c as UserProjectConfigFn, d as UserProjectConfigExport, T as TestProjectConfiguration } from './chunks/reporters.d.r7poTZjA.js';
4
+ export { W as WorkspaceProjectConfiguration } from './chunks/reporters.d.r7poTZjA.js';
5
+ import './chunks/vite.d.Fvq-NZoa.js';
6
6
  import { F as FakeTimerInstallOpts } from './chunks/config.d.DevWltVl.js';
7
7
  import '@vitest/runner';
8
8
  import './chunks/environment.d.C8UItCbf.js';
@@ -1,4 +1,4 @@
1
- import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.CqBhtcTq.js';
1
+ import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.r7poTZjA.js';
2
2
  import { TransformResult } from 'vite';
3
3
  import { A as AfterSuiteRunMeta } from './chunks/environment.d.C8UItCbf.js';
4
4
  import '@vitest/runner';
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { File as File$1, TaskResultPack as TaskResultPack$1, TaskEventPack, TaskPopulated, Suite as Suite$1, Test as Test$1, Custom as Custom$1, Task as Task$1, TaskBase as TaskBase$1, TaskResult as TaskResult$1, DoneCallback as DoneCallback$1, RuntimeContext as RuntimeContext$1, SuiteHooks as SuiteHooks$1, SequenceHooks as SequenceHooks$1, SequenceSetupFiles as SequenceSetupFiles$1 } from '@vitest/runner';
2
2
  export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
3
- import { S as SerializedTestSpecification, e as CoverageProvider$1, a as ReportContext$1, f as CoverageProviderModule$1, g as CoverageReporter$1, h as CoverageProviderName, i as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, j as CoverageIstanbulOptions$1, b as CoverageV8Options$1, k as CustomProviderOptions$1, l as Reporter$1, V as Vitest$1, m as BrowserScript$1, n as BrowserConfigOptions$1, o as BuiltinEnvironment$1, p as VitestEnvironment$1, P as Pool$1, q as PoolOptions$1, r as CSSModuleScopeStrategy$1, A as ApiConfig$1, s as VitestRunMode$1, D as DepsOptimizationOptions$1, t as TransformModePatterns$1, I as InlineConfig$1, u as TypecheckConfig$1, v as UserConfig$1, w as ResolvedConfig$1, x as ProjectConfig$1, U as UserWorkspaceConfig$1, y as BenchmarkUserOptions$1 } from './chunks/reporters.d.CqBhtcTq.js';
3
+ import { S as SerializedTestSpecification, e as CoverageProvider$1, a as ReportContext$1, f as CoverageProviderModule$1, g as CoverageReporter$1, h as CoverageProviderName, i as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, j as CoverageIstanbulOptions$1, b as CoverageV8Options$1, k as CustomProviderOptions$1, l as Reporter$1, V as Vitest$1, m as BrowserScript$1, n as BrowserConfigOptions$1, o as BuiltinEnvironment$1, p as VitestEnvironment$1, P as Pool$1, q as PoolOptions$1, r as CSSModuleScopeStrategy$1, A as ApiConfig$1, s as VitestRunMode$1, D as DepsOptimizationOptions$1, t as TransformModePatterns$1, I as InlineConfig$1, u as TypecheckConfig$1, v as UserConfig$1, w as ResolvedConfig$1, x as ProjectConfig$1, U as UserWorkspaceConfig$1, y as BenchmarkUserOptions$1 } from './chunks/reporters.d.r7poTZjA.js';
4
4
  import { W as WorkerContext$1 } from './chunks/worker.d.CSFlSYJg.js';
5
5
  import { R as RawErrsMap$1, T as TscErrorInfo$1, C as CollectLineNumbers$1, a as CollectLines$1, b as RootAndTarget$1, c as Context$1 } from './chunks/global.d.Cg2sEPIm.js';
6
6
  import { b as Awaitable$1, U as UserConsoleLog, M as ModuleGraphData, P as ProvidedContext, N as Nullable$1, c as Arrayable$1, d as ArgumentsType$1, e as MutableArray$1, C as Constructable$1, a as EnvironmentReturn$1, V as VmEnvironmentReturn$1, E as Environment$1, R as ResolvedTestEnvironment$1, J as JSDOMOptions$1, H as HappyDOMOptions$1, f as EnvironmentOptions$1 } from './chunks/environment.d.C8UItCbf.js';
7
7
  export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d.C8UItCbf.js';
8
8
  import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.C58isfFm.js';
9
9
  export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.d.C58isfFm.js';
10
- import './chunks/vite.d.BUZTGxQ3.js';
10
+ import './chunks/vite.d.Fvq-NZoa.js';
11
11
  import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.DevWltVl.js';
12
12
  export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.DevWltVl.js';
13
13
  import { ExpectStatic } from '@vitest/expect';
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { w as ResolvedConfig, v as UserConfig, s as VitestRunMode, z as VitestOptions, V as Vitest, A as ApiConfig, E as TestProject, F as TestSequencer, G as TestSpecification, L as Logger, H as TestModule, M as ModuleDiagnostic } from './chunks/reporters.d.CqBhtcTq.js';
2
- export { B as BaseCoverageOptions, y as BenchmarkUserOptions, ad as BrowserBuiltinProvider, ae as BrowserCommand, af as BrowserCommandContext, n as BrowserConfigOptions, ag as BrowserInstanceOption, ah as BrowserOrchestrator, ai as BrowserProvider, aj as BrowserProviderInitializationOptions, ak as BrowserProviderModule, al as BrowserProviderOptions, m as BrowserScript, am as BrowserServerState, an as BrowserServerStateSession, o as BuiltinEnvironment, ao as CDPSession, r as CSSModuleScopeStrategy, j as CoverageIstanbulOptions, i as CoverageOptions, e as CoverageProvider, f as CoverageProviderModule, g as CoverageReporter, b as CoverageV8Options, k as CustomProviderOptions, D as DepsOptimizationOptions, Z as HTMLOptions, I as InlineConfig, $ as JUnitOptions, _ as JsonOptions, O as OnServerRestartHandler, J as OnTestsRerunHandler, ap as ParentProjectBrowser, P as Pool, q as PoolOptions, N as ProcessPool, aq as ProjectBrowser, x as ProjectConfig, a as ReportContext, aw as ReportedHookContext, l as Reporter, at as ResolveSnapshotPathHandler, au as ResolveSnapshotPathHandlerContext, ar as ResolvedBrowserOptions, R as ResolvedCoverageOptions, as as ResolvedProjectConfig, Y as SerializedTestProject, a0 as TaskOptions, a1 as TestCase, a2 as TestCollection, a3 as TestDiagnostic, a4 as TestModuleState, a5 as TestResult, a6 as TestResultFailed, a7 as TestResultPassed, a8 as TestResultSkipped, ax as TestRunEndReason, av as TestRunResult, ac as TestSequencerConstructor, a9 as TestState, aa as TestSuite, ab as TestSuiteState, t as TransformModePatterns, u as TypecheckConfig, U as UserWorkspaceConfig, p as VitestEnvironment, K as VitestPackageInstaller, Q as WorkspaceSpec, X as getFilePoolName } from './chunks/reporters.d.CqBhtcTq.js';
1
+ import { w as ResolvedConfig, v as UserConfig, s as VitestRunMode, z as VitestOptions, V as Vitest, A as ApiConfig, E as TestProject, F as TestSequencer, G as TestSpecification, L as Logger, H as TestModule, M as ModuleDiagnostic } from './chunks/reporters.d.r7poTZjA.js';
2
+ export { B as BaseCoverageOptions, y as BenchmarkUserOptions, ad as BrowserBuiltinProvider, ae as BrowserCommand, af as BrowserCommandContext, n as BrowserConfigOptions, ag as BrowserInstanceOption, ah as BrowserOrchestrator, ai as BrowserProvider, aj as BrowserProviderInitializationOptions, ak as BrowserProviderModule, al as BrowserProviderOptions, m as BrowserScript, am as BrowserServerState, an as BrowserServerStateSession, o as BuiltinEnvironment, ao as CDPSession, r as CSSModuleScopeStrategy, j as CoverageIstanbulOptions, i as CoverageOptions, e as CoverageProvider, f as CoverageProviderModule, g as CoverageReporter, b as CoverageV8Options, k as CustomProviderOptions, D as DepsOptimizationOptions, Z as HTMLOptions, I as InlineConfig, $ as JUnitOptions, _ as JsonOptions, O as OnServerRestartHandler, J as OnTestsRerunHandler, ap as ParentProjectBrowser, P as Pool, q as PoolOptions, N as ProcessPool, aq as ProjectBrowser, x as ProjectConfig, a as ReportContext, aw as ReportedHookContext, l as Reporter, at as ResolveSnapshotPathHandler, au as ResolveSnapshotPathHandlerContext, ar as ResolvedBrowserOptions, R as ResolvedCoverageOptions, as as ResolvedProjectConfig, Y as SerializedTestProject, a0 as TaskOptions, a1 as TestCase, a2 as TestCollection, a3 as TestDiagnostic, a4 as TestModuleState, a5 as TestResult, a6 as TestResultFailed, a7 as TestResultPassed, a8 as TestResultSkipped, ax as TestRunEndReason, av as TestRunResult, ac as TestSequencerConstructor, a9 as TestState, aa as TestSuite, ab as TestSuiteState, t as TransformModePatterns, u as TypecheckConfig, U as UserWorkspaceConfig, p as VitestEnvironment, K as VitestPackageInstaller, Q as WorkspaceSpec, X as getFilePoolName } from './chunks/reporters.d.r7poTZjA.js';
3
3
  import { UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1, createServer as createServer$1 } from 'vite';
4
4
  import * as vite from 'vite';
5
5
  export { vite as Vite };
@@ -14,7 +14,7 @@ export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as R
14
14
  export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions } from './chunks/environment.d.C8UItCbf.js';
15
15
  export { SerializedError } from '@vitest/utils';
16
16
  export { b as RuntimeConfig } from './chunks/config.d.DevWltVl.js';
17
- import './chunks/vite.d.BUZTGxQ3.js';
17
+ import './chunks/vite.d.Fvq-NZoa.js';
18
18
  export { generateFileHash } from '@vitest/runner/utils';
19
19
  import 'node:console';
20
20
  import '@vitest/utils/source-map';
package/dist/node.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { resolveConfig as resolveConfig$1, mergeConfig, createServer as createServer$1 } from 'vite';
2
2
  export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
3
- import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.Ckwz_xSb.js';
4
- export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, i as isValidApiRequest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.Ckwz_xSb.js';
5
- export { p as parseCLI } from './chunks/cac.CeVHgzve.js';
3
+ import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.BwkkJsRe.js';
4
+ export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, i as isValidApiRequest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.BwkkJsRe.js';
5
+ export { p as parseCLI } from './chunks/cac.BjmXy7OV.js';
6
6
  import { r as resolveConfig$2 } from './chunks/coverage.gV8doR2Y.js';
7
7
  export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.gV8doR2Y.js';
8
8
  import { slash } from '@vitest/utils';
@@ -19,7 +19,7 @@ import '@vitest/snapshot/manager';
19
19
  import 'vite-node/client';
20
20
  import 'vite-node/server';
21
21
  import './chunks/index.68735LiX.js';
22
- import './chunks/index.B8tIoLPT.js';
22
+ import './chunks/index.DOyx6FYJ.js';
23
23
  import 'tinyrainbow';
24
24
  import './chunks/utils.bLM2atbD.js';
25
25
  import 'node:util';
@@ -1,4 +1,4 @@
1
- export { aM as BaseReporter, ay as BasicReporter, aN as BenchmarkBuiltinReporters, az as BenchmarkReporter, aA as BenchmarkReportsMap, aO as BuiltinReporterOptions, aP as BuiltinReporters, aB as DefaultReporter, aC as DotReporter, aD as GithubActionsReporter, aE as HangingProcessReporter, aG as JUnitReporter, aQ as JsonAssertionResult, aF as JsonReporter, aR as JsonTestResult, aS as JsonTestResults, aw as ReportedHookContext, l as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ax as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.d.CqBhtcTq.js';
1
+ export { aM as BaseReporter, ay as BasicReporter, aN as BenchmarkBuiltinReporters, az as BenchmarkReporter, aA as BenchmarkReportsMap, aO as BuiltinReporterOptions, aP as BuiltinReporters, aB as DefaultReporter, aC as DotReporter, aD as GithubActionsReporter, aE as HangingProcessReporter, aG as JUnitReporter, aQ as JsonAssertionResult, aF as JsonReporter, aR as JsonTestResult, aS as JsonTestResults, aw as ReportedHookContext, l as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ax as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.d.r7poTZjA.js';
2
2
  import '@vitest/runner';
3
3
  import './chunks/environment.d.C8UItCbf.js';
4
4
  import '@vitest/utils';
package/dist/reporters.js CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BasicReporter, a as BenchmarkReporter, b as BenchmarkReportsMap, D as DefaultReporter, c as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, d as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, e as TapReporter, V as VerboseBenchmarkReporter, f as VerboseReporter } from './chunks/index.B8tIoLPT.js';
1
+ export { B as BasicReporter, a as BenchmarkReporter, b as BenchmarkReportsMap, D as DefaultReporter, c as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, d as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, e as TapReporter, V as VerboseBenchmarkReporter, f as VerboseReporter } from './chunks/index.DOyx6FYJ.js';
2
2
  import 'node:fs';
3
3
  import '@vitest/runner/utils';
4
4
  import 'pathe';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "3.0.9",
4
+ "version": "3.1.0-beta.1",
5
5
  "description": "Next generation testing framework powered by Vite",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -123,8 +123,8 @@
123
123
  "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
124
124
  "happy-dom": "*",
125
125
  "jsdom": "*",
126
- "@vitest/browser": "3.0.9",
127
- "@vitest/ui": "3.0.9"
126
+ "@vitest/browser": "3.1.0-beta.1",
127
+ "@vitest/ui": "3.1.0-beta.1"
128
128
  },
129
129
  "peerDependenciesMeta": {
130
130
  "@edge-runtime/vm": {
@@ -162,14 +162,14 @@
162
162
  "tinyrainbow": "^2.0.0",
163
163
  "vite": "^5.0.0 || ^6.0.0",
164
164
  "why-is-node-running": "^2.3.0",
165
- "@vitest/mocker": "3.0.9",
166
- "@vitest/expect": "3.0.9",
167
- "@vitest/pretty-format": "^3.0.9",
168
- "@vitest/runner": "3.0.9",
169
- "@vitest/snapshot": "3.0.9",
170
- "@vitest/utils": "3.0.9",
171
- "@vitest/spy": "3.0.9",
172
- "vite-node": "3.0.9"
165
+ "@vitest/expect": "3.1.0-beta.1",
166
+ "@vitest/pretty-format": "^3.1.0-beta.1",
167
+ "@vitest/mocker": "3.1.0-beta.1",
168
+ "@vitest/runner": "3.1.0-beta.1",
169
+ "@vitest/spy": "3.1.0-beta.1",
170
+ "@vitest/snapshot": "3.1.0-beta.1",
171
+ "@vitest/utils": "3.1.0-beta.1",
172
+ "vite-node": "3.1.0-beta.1"
173
173
  },
174
174
  "devDependencies": {
175
175
  "@ampproject/remapping": "^2.3.0",