vitest 0.31.2 → 0.31.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { startTests } from '@vitest/runner';
2
- import { a as ResolvedConfig, $ as CoverageOptions, X as CoverageProvider, Z as CoverageProviderModule } from './types-73d6349f.js';
2
+ import { a as ResolvedConfig, $ as CoverageOptions, X as CoverageProvider, Z as CoverageProviderModule } from './types-fe79687a.js';
3
3
  import '@vitest/snapshot';
4
4
  import '@vitest/expect';
5
5
  import 'vite';
package/dist/browser.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { startTests } from '@vitest/runner';
2
- export { s as setupCommonEnv } from './vendor-setup.common.3c71d21d.js';
2
+ export { s as setupCommonEnv } from './vendor-setup.common.823a1300.js';
3
3
  export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor-coverage.c8fd34c3.js';
4
4
  import '@vitest/utils';
5
5
  import './vendor-run-once.69ce7172.js';
@@ -3,7 +3,7 @@ import p from 'path';
3
3
  import require$$0$1 from 'util';
4
4
  import require$$0$3 from 'child_process';
5
5
  import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1 } from './vendor-index.c1e09929.js';
6
- import { o as onetime$1 } from './vendor-cli-api.35332ab3.js';
6
+ import { o as onetime$1 } from './vendor-cli-api.0726b980.js';
7
7
  import require$$0$2 from 'os';
8
8
  import 'node:buffer';
9
9
  import 'node:path';
@@ -41,7 +41,7 @@ import './vendor-index.5037f2c0.js';
41
41
  import 'node:worker_threads';
42
42
  import 'tinypool';
43
43
  import 'node:perf_hooks';
44
- import './vendor-tasks.042d6084.js';
44
+ import './vendor-tasks.f9d75aed.js';
45
45
  import 'node:module';
46
46
  import 'node:crypto';
47
47
  import 'node:fs/promises';
@@ -1,7 +1,7 @@
1
1
  import { g as globalApis } from './vendor-constants.538d9b49.js';
2
- import { i as index } from './vendor-index.c8d81526.js';
2
+ import { i as index } from './vendor-index.f81f6285.js';
3
3
  import '@vitest/runner';
4
- import './vendor-vi.c6384282.js';
4
+ import './vendor-vi.23b98fa1.js';
5
5
  import '@vitest/runner/utils';
6
6
  import '@vitest/utils';
7
7
  import './vendor-index.fad2598b.js';
@@ -12,7 +12,7 @@ import 'chai';
12
12
  import './vendor-_commonjsHelpers.76cdd49e.js';
13
13
  import '@vitest/expect';
14
14
  import '@vitest/snapshot';
15
- import './vendor-tasks.042d6084.js';
15
+ import './vendor-tasks.f9d75aed.js';
16
16
  import 'util';
17
17
  import '@vitest/spy';
18
18
  import './vendor-run-once.69ce7172.js';
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { normalize } from 'pathe';
2
2
  import cac from 'cac';
3
3
  import c from 'picocolors';
4
- import { v as version, s as startVitest, d as divider } from './vendor-cli-api.35332ab3.js';
4
+ import { v as version, s as startVitest, d as divider } from './vendor-cli-api.0726b980.js';
5
5
  import './vendor-constants.538d9b49.js';
6
6
  import './vendor-coverage.c8fd34c3.js';
7
7
  import './vendor-index.75f2b63d.js';
@@ -36,7 +36,7 @@ import 'node:worker_threads';
36
36
  import 'node:os';
37
37
  import 'tinypool';
38
38
  import 'node:perf_hooks';
39
- import './vendor-tasks.042d6084.js';
39
+ import './vendor-tasks.f9d75aed.js';
40
40
  import 'node:module';
41
41
  import 'node:crypto';
42
42
  import './vendor-index.c1e09929.js';
package/dist/config.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
2
2
  export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
3
- import { a0 as ResolvedCoverageOptions, q as UserConfig, a3 as CoverageC8Options, a4 as CustomProviderOptions, a2 as CoverageIstanbulOptions, ag as HtmlOptions, ah as FileOptions, ai as CloverOptions, aj as CoberturaOptions, ak as HtmlSpaOptions, al as LcovOptions, am as LcovOnlyOptions, an as TeamcityOptions, ao as TextOptions, ap as ProjectOptions, F as FakeTimerInstallOpts, P as ProjectConfig } from './types-73d6349f.js';
3
+ import { a0 as ResolvedCoverageOptions, q as UserConfig, a3 as CoverageC8Options, a4 as CustomProviderOptions, a2 as CoverageIstanbulOptions, ag as HtmlOptions, ah as FileOptions, ai as CloverOptions, aj as CoberturaOptions, ak as HtmlSpaOptions, al as LcovOptions, am as LcovOnlyOptions, an as TeamcityOptions, ao as TextOptions, ap as ProjectOptions, F as FakeTimerInstallOpts, P as ProjectConfig } from './types-fe79687a.js';
4
4
  import '@vitest/snapshot';
5
5
  import '@vitest/expect';
6
6
  import '@vitest/runner';
@@ -1,4 +1,4 @@
1
- import { a1 as BaseCoverageOptions, a0 as ResolvedCoverageOptions } from './types-73d6349f.js';
1
+ import { a1 as BaseCoverageOptions, a0 as ResolvedCoverageOptions } from './types-fe79687a.js';
2
2
  import '@vitest/snapshot';
3
3
  import '@vitest/expect';
4
4
  import 'vite';
package/dist/entry.js CHANGED
@@ -2,7 +2,7 @@ import { performance } from 'node:perf_hooks';
2
2
  import { startTests } from '@vitest/runner';
3
3
  import { resolve } from 'pathe';
4
4
  import { c as resetModules } from './vendor-index.fad2598b.js';
5
- import { R as RealDate, d as globalExpect, s as setupChaiConfig, v as vi } from './vendor-vi.c6384282.js';
5
+ import { R as RealDate, d as globalExpect, s as setupChaiConfig, v as vi } from './vendor-vi.23b98fa1.js';
6
6
  import { d as distDir } from './vendor-paths.84fc7a99.js';
7
7
  import { a as startCoverageInsideWorker, t as takeCoverageInsideWorker, s as stopCoverageInsideWorker } from './vendor-coverage.c8fd34c3.js';
8
8
  import { createRequire } from 'node:module';
@@ -12,8 +12,8 @@ import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
12
12
  import { e as environments } from './vendor-index.75f2b63d.js';
13
13
  import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment';
14
14
  import { r as rpc } from './vendor-rpc.4d3d7a54.js';
15
- import { i as index } from './vendor-index.c8d81526.js';
16
- import { s as setupCommonEnv } from './vendor-setup.common.3c71d21d.js';
15
+ import { i as index } from './vendor-index.f81f6285.js';
16
+ import { s as setupCommonEnv } from './vendor-setup.common.823a1300.js';
17
17
  import { g as getWorkerState } from './vendor-global.6795f91f.js';
18
18
  import 'std-env';
19
19
  import '@vitest/runner/utils';
@@ -21,7 +21,7 @@ import 'chai';
21
21
  import './vendor-_commonjsHelpers.76cdd49e.js';
22
22
  import '@vitest/expect';
23
23
  import '@vitest/snapshot';
24
- import './vendor-tasks.042d6084.js';
24
+ import './vendor-tasks.f9d75aed.js';
25
25
  import 'util';
26
26
  import '@vitest/spy';
27
27
  import 'node:url';
@@ -1,4 +1,4 @@
1
- import { Q as Environment } from './types-73d6349f.js';
1
+ import { Q as Environment } from './types-fe79687a.js';
2
2
  import '@vitest/snapshot';
3
3
  import '@vitest/expect';
4
4
  import 'vite';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { File, TaskResultPack, CancelReason } from '@vitest/runner';
2
2
  export { DoneCallback, File, HookCleanupCallback, HookListener, OnTestFailedHandler, RunMode, RuntimeContext, SequenceHooks, SequenceSetupFiles, Suite, SuiteAPI, SuiteCollector, SuiteFactory, SuiteHooks, Task, TaskBase, TaskMeta, TaskResult, TaskResultPack, TaskState, Test, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
3
- import { B as BenchmarkAPI, F as FakeTimerInstallOpts, M as MockFactoryWithHelper, R as RuntimeConfig, A as AfterSuiteRunMeta, U as UserConsoleLog, a as ResolvedConfig, b as ModuleGraphData, c as Reporter } from './types-73d6349f.js';
4
- export { n as ApiConfig, G as ArgumentsType, D as Arrayable, z as Awaitable, a1 as BaseCoverageOptions, a8 as BenchFunction, a6 as Benchmark, a7 as BenchmarkResult, a5 as BenchmarkUserOptions, k as BuiltinEnvironment, m as CSSModuleScopeStrategy, C as ChaiConfig, f as CollectLineNumbers, h as CollectLines, K as Constructable, j as Context, v as ContextRPC, u as ContextTestEnvironment, a3 as CoverageC8Options, a2 as CoverageIstanbulOptions, $ as CoverageOptions, X as CoverageProvider, Z as CoverageProviderModule, _ as CoverageReporter, a4 as CustomProviderOptions, Q as Environment, E as EnvironmentOptions, O as EnvironmentReturn, I as InlineConfig, J as JSDOMOptions, L as ModuleCache, H as MutableArray, N as Nullable, S as OnServerRestartHandler, P as ProjectConfig, e as RawErrsMap, Y as ReportContext, x as ResolveIdFunction, a0 as ResolvedCoverageOptions, i as RootAndTarget, t as RunnerRPC, r as RuntimeRPC, T as TscErrorInfo, p as TypecheckConfig, q as UserConfig, w as Vitest, V as VitestEnvironment, l as VitestPool, o as VitestRunMode, W as WorkerContext, y as WorkerGlobalState, d as createExpect, g as expect, s as setupChaiConfig } from './types-73d6349f.js';
3
+ import { B as BenchmarkAPI, F as FakeTimerInstallOpts, M as MockFactoryWithHelper, R as RuntimeConfig, A as AfterSuiteRunMeta, U as UserConsoleLog, a as ResolvedConfig, b as ModuleGraphData, c as Reporter } from './types-fe79687a.js';
4
+ export { n as ApiConfig, G as ArgumentsType, D as Arrayable, z as Awaitable, a1 as BaseCoverageOptions, a8 as BenchFunction, a6 as Benchmark, a7 as BenchmarkResult, a5 as BenchmarkUserOptions, k as BuiltinEnvironment, m as CSSModuleScopeStrategy, C as ChaiConfig, f as CollectLineNumbers, h as CollectLines, K as Constructable, j as Context, v as ContextRPC, u as ContextTestEnvironment, a3 as CoverageC8Options, a2 as CoverageIstanbulOptions, $ as CoverageOptions, X as CoverageProvider, Z as CoverageProviderModule, _ as CoverageReporter, a4 as CustomProviderOptions, Q as Environment, E as EnvironmentOptions, O as EnvironmentReturn, I as InlineConfig, J as JSDOMOptions, L as ModuleCache, H as MutableArray, N as Nullable, S as OnServerRestartHandler, P as ProjectConfig, e as RawErrsMap, Y as ReportContext, x as ResolveIdFunction, a0 as ResolvedCoverageOptions, i as RootAndTarget, t as RunnerRPC, r as RuntimeRPC, T as TscErrorInfo, p as TypecheckConfig, q as UserConfig, w as Vitest, V as VitestEnvironment, l as VitestPool, o as VitestRunMode, W as WorkerContext, y as WorkerGlobalState, d as createExpect, g as expect, s as setupChaiConfig } from './types-fe79687a.js';
5
5
  import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, EnhancedSpy } from '@vitest/spy';
6
6
  export { EnhancedSpy, Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject, SpyInstance } from '@vitest/spy';
7
7
  export { SnapshotEnvironment } from '@vitest/snapshot/environment';
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
2
- export { e as bench, c as createExpect, d as expect, s as setupChaiConfig, v as vi, f as vitest } from './vendor-vi.c6384282.js';
2
+ export { e as bench, c as createExpect, d as expect, s as setupChaiConfig, v as vi, f as vitest } from './vendor-vi.23b98fa1.js';
3
3
  export { i as isFirstRun, a as runOnce } from './vendor-run-once.69ce7172.js';
4
- import { d as dist } from './vendor-index.c8d81526.js';
5
- export { b as assertType, g as getRunningMode, a as isWatchMode } from './vendor-index.c8d81526.js';
4
+ import { d as dist } from './vendor-index.f81f6285.js';
5
+ export { b as assertType, g as getRunningMode, a as isWatchMode } from './vendor-index.f81f6285.js';
6
6
  import * as chai from 'chai';
7
7
  export { chai };
8
8
  export { assert, should } from 'chai';
@@ -15,7 +15,7 @@ import './vendor-global.6795f91f.js';
15
15
  import './vendor-_commonjsHelpers.76cdd49e.js';
16
16
  import '@vitest/expect';
17
17
  import '@vitest/snapshot';
18
- import './vendor-tasks.042d6084.js';
18
+ import './vendor-tasks.f9d75aed.js';
19
19
  import 'util';
20
20
  import '@vitest/spy';
21
21
 
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { o as VitestRunMode, q as UserConfig, w as Vitest, a9 as MockFactory, aa as MockMap, ab as TestSequencer, ac as WorkspaceSpec } from './types-73d6349f.js';
2
- export { af as TestSequencerConstructor, ad as VitestWorkspace, ae as startVitest } from './types-73d6349f.js';
1
+ import { o as VitestRunMode, q as UserConfig, w as Vitest, a9 as MockFactory, aa as MockMap, ab as TestSequencer, ac as WorkspaceSpec } from './types-fe79687a.js';
2
+ export { af as TestSequencerConstructor, ad as VitestWorkspace, ae as startVitest } from './types-fe79687a.js';
3
3
  import { UserConfig as UserConfig$1, Plugin } from 'vite';
4
4
  import { ViteNodeRunner } from 'vite-node/client';
5
5
  import { ViteNodeRunnerOptions } from 'vite-node';
package/dist/node.js CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './vendor-cli-api.35332ab3.js';
1
+ export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './vendor-cli-api.0726b980.js';
2
2
  export { V as VitestExecutor } from './vendor-execute.132a3e09.js';
3
3
  import 'pathe';
4
4
  import './vendor-constants.538d9b49.js';
@@ -36,7 +36,7 @@ import 'node:worker_threads';
36
36
  import 'node:os';
37
37
  import 'tinypool';
38
38
  import 'node:perf_hooks';
39
- import './vendor-tasks.042d6084.js';
39
+ import './vendor-tasks.f9d75aed.js';
40
40
  import 'node:module';
41
41
  import 'node:crypto';
42
42
  import './vendor-index.c1e09929.js';
package/dist/runners.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VitestRunner, VitestRunnerImportSource, Suite, Test, CancelReason, TestContext } from '@vitest/runner';
2
- import { a as ResolvedConfig } from './types-73d6349f.js';
2
+ import { a as ResolvedConfig } from './types-fe79687a.js';
3
3
  import '@vitest/snapshot';
4
4
  import '@vitest/expect';
5
5
  import 'vite';
package/dist/runners.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
2
- import { g as getSnapshotClient, c as createExpect, v as vi, a as getBenchOptions, b as getBenchFn } from './vendor-vi.c6384282.js';
2
+ import { g as getSnapshotClient, c as createExpect, v as vi, a as getBenchOptions, b as getBenchFn } from './vendor-vi.23b98fa1.js';
3
3
  import './vendor-index.fad2598b.js';
4
4
  import { r as rpc } from './vendor-rpc.4d3d7a54.js';
5
- import { g as getFullName } from './vendor-tasks.042d6084.js';
5
+ import { g as getFullName } from './vendor-tasks.f9d75aed.js';
6
6
  import { g as getWorkerState } from './vendor-global.6795f91f.js';
7
7
  import { getNames } from '@vitest/runner/utils';
8
8
  import { performance } from 'node:perf_hooks';
@@ -571,8 +571,8 @@ declare abstract class BaseReporter implements Reporter {
571
571
  onUserConsoleLog(log: UserConsoleLog): void;
572
572
  shouldLog(log: UserConsoleLog): boolean;
573
573
  onServerRestart(reason?: string): void;
574
- reportSummary(files: File[]): Promise<void>;
575
- reportTestSummary(files: File[]): Promise<void>;
574
+ reportSummary(files: File[], errors: unknown[]): Promise<void>;
575
+ reportTestSummary(files: File[], errors: unknown[]): Promise<void>;
576
576
  private printErrorsSummary;
577
577
  reportBenchmarkSummary(files: File[]): Promise<void>;
578
578
  private printTaskErrors;
@@ -581,7 +581,7 @@ declare abstract class BaseReporter implements Reporter {
581
581
 
582
582
  declare class BasicReporter extends BaseReporter {
583
583
  isTTY: boolean;
584
- reportSummary(files: File[]): Promise<void>;
584
+ reportSummary(files: File[], errors: unknown[]): Promise<void>;
585
585
  }
586
586
 
587
587
  type Awaitable<T> = T | PromiseLike<T>;
@@ -31,7 +31,7 @@ import { cpus, hostname } from 'node:os';
31
31
  import Tinypool from 'tinypool';
32
32
  import { createDefer, getSafeTimers, notNullish, parseErrorStacktrace, shuffle, stringify as stringify$5, positionToOffset, lineSplitRE } from '@vitest/utils';
33
33
  import { performance } from 'node:perf_hooks';
34
- import { g as getFullName, h as hasFailedSnapshot } from './vendor-tasks.042d6084.js';
34
+ import { g as getFullName, h as hasFailedSnapshot } from './vendor-tasks.f9d75aed.js';
35
35
  import { getTests, hasFailed, getSuites, generateHash, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, getTasks } from '@vitest/runner/utils';
36
36
  import { createRequire } from 'node:module';
37
37
  import { createHash } from 'node:crypto';
@@ -60,7 +60,7 @@ function _mergeNamespaces(n, m) {
60
60
  return Object.freeze(n);
61
61
  }
62
62
 
63
- var version$1 = "0.31.2";
63
+ var version$1 = "0.31.3";
64
64
 
65
65
  const __dirname$1 = url.fileURLToPath(new URL(".", import.meta.url));
66
66
  async function ensurePackageInstalled(dependency, root) {
@@ -79,7 +79,7 @@ async function ensurePackageInstalled(dependency, root) {
79
79
  message: c.reset(`Do you want to install ${c.green(dependency)}?`)
80
80
  });
81
81
  if (install) {
82
- await (await import('./chunk-install-pkg.4207d842.js')).installPackage(dependency, { dev: true });
82
+ await (await import('./chunk-install-pkg.1ed93fe7.js')).installPackage(dependency, { dev: true });
83
83
  process.stderr.write(c.yellow(`
84
84
  Package ${dependency} installed, re-run the command to start.
85
85
  `));
@@ -7676,11 +7676,10 @@ class BaseReporter {
7676
7676
  }
7677
7677
  async onFinished(files = this.ctx.state.getFiles(), errors = this.ctx.state.getUnhandledErrors()) {
7678
7678
  this.end = performance.now();
7679
- await this.reportSummary(files);
7679
+ await this.reportSummary(files, errors);
7680
7680
  if (errors.length) {
7681
7681
  if (!this.ctx.config.dangerouslyIgnoreUnhandledErrors)
7682
7682
  process.exitCode = 1;
7683
- await this.ctx.logger.printUnhandledErrors(errors);
7684
7683
  }
7685
7684
  }
7686
7685
  onTaskUpdate(packs) {
@@ -7821,14 +7820,14 @@ ${log.content}
7821
7820
  reason === "config" ? "\nRestarting due to config changes..." : "\nRestarting Vitest..."
7822
7821
  )));
7823
7822
  }
7824
- async reportSummary(files) {
7825
- await this.printErrorsSummary(files);
7823
+ async reportSummary(files, errors) {
7824
+ await this.printErrorsSummary(files, errors);
7826
7825
  if (this.mode === "benchmark")
7827
7826
  await this.reportBenchmarkSummary(files);
7828
7827
  else
7829
- await this.reportTestSummary(files);
7828
+ await this.reportTestSummary(files, errors);
7830
7829
  }
7831
- async reportTestSummary(files) {
7830
+ async reportTestSummary(files, errors) {
7832
7831
  const tests = getTests(files);
7833
7832
  const logger = this.ctx.logger;
7834
7833
  const executionTime = this.end - this.start;
@@ -7865,6 +7864,8 @@ ${log.content}
7865
7864
  });
7866
7865
  logger.log(padTitle("Type Errors"), failed.length ? c.bold(c.red(`${failed.length} failed`)) : c.dim("no errors"));
7867
7866
  }
7867
+ if (errors.length)
7868
+ logger.log(padTitle("Errors"), c.bold(c.red(`${errors.length} error${errors.length > 1 ? "s" : ""}`)));
7868
7869
  logger.log(padTitle("Start at"), formatTimeString(this._timeStart));
7869
7870
  if (this.watchFilters)
7870
7871
  logger.log(padTitle("Duration"), time(threadTime));
@@ -7874,7 +7875,7 @@ ${log.content}
7874
7875
  logger.log(padTitle("Duration"), time(executionTime) + c.dim(` (transform ${time(transformTime)}, setup ${time(setupTime)}, collect ${time(collectTime)}, tests ${time(testsTime)}, environment ${time(environmentTime)}, prepare ${time(prepareTime)})`));
7875
7876
  logger.log();
7876
7877
  }
7877
- async printErrorsSummary(files) {
7878
+ async printErrorsSummary(files, errors) {
7878
7879
  const logger = this.ctx.logger;
7879
7880
  const suites = getSuites(files);
7880
7881
  const tests = getTests(files);
@@ -7900,6 +7901,10 @@ ${log.content}
7900
7901
  logger.error();
7901
7902
  await this.printTaskErrors(failedTests, errorDivider);
7902
7903
  }
7904
+ if (errors.length) {
7905
+ await logger.printUnhandledErrors(errors);
7906
+ logger.error();
7907
+ }
7903
7908
  return tests;
7904
7909
  }
7905
7910
  async reportBenchmarkSummary(files) {
@@ -7973,9 +7978,9 @@ class BasicReporter extends BaseReporter {
7973
7978
  super(...arguments);
7974
7979
  this.isTTY = false;
7975
7980
  }
7976
- reportSummary(files) {
7981
+ reportSummary(files, errors) {
7977
7982
  this.ctx.logger.log();
7978
- return super.reportSummary(files);
7983
+ return super.reportSummary(files, errors);
7979
7984
  }
7980
7985
  }
7981
7986
 
@@ -9009,7 +9014,7 @@ class DefaultReporter extends BaseReporter {
9009
9014
  const files = this.ctx.state.getFiles(this.watchFilters);
9010
9015
  createListRenderer(files, this.rendererOptions).stop();
9011
9016
  this.ctx.logger.log();
9012
- await super.reportSummary(files);
9017
+ await super.reportSummary(files, this.ctx.state.getUnhandledErrors());
9013
9018
  super.onWatcherStart();
9014
9019
  }
9015
9020
  onCollected() {
@@ -9904,7 +9909,7 @@ class TableReporter extends BaseReporter {
9904
9909
  const files = this.ctx.state.getFiles(this.watchFilters);
9905
9910
  createTableRenderer(files, this.rendererOptions).stop();
9906
9911
  this.ctx.logger.log();
9907
- await super.reportSummary(files);
9912
+ await super.reportSummary(files, this.ctx.state.getUnhandledErrors());
9908
9913
  super.onWatcherStart();
9909
9914
  }
9910
9915
  onCollected() {
@@ -11160,7 +11165,7 @@ createLogUpdate(process$1.stdout);
11160
11165
 
11161
11166
  createLogUpdate(process$1.stderr);
11162
11167
 
11163
- var version = "0.31.2";
11168
+ var version = "0.31.3";
11164
11169
 
11165
11170
  const comma = ','.charCodeAt(0);
11166
11171
  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -1,5 +1,5 @@
1
1
  import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
2
- import { e as bench, c as createExpect, d as globalExpect, s as setupChaiConfig, v as vi, f as vitest } from './vendor-vi.c6384282.js';
2
+ import { e as bench, c as createExpect, d as globalExpect, s as setupChaiConfig, v as vi, f as vitest } from './vendor-vi.23b98fa1.js';
3
3
  import { i as isFirstRun, a as runOnce } from './vendor-run-once.69ce7172.js';
4
4
  import * as chai from 'chai';
5
5
  import { assert, should } from 'chai';
@@ -10,7 +10,7 @@ async function setupCommonEnv(config) {
10
10
  globalSetup = true;
11
11
  setSafeTimers();
12
12
  if (config.globals)
13
- (await import('./chunk-integrations-globals.51b8ecab.js')).registerApiGlobally();
13
+ (await import('./chunk-integrations-globals.6a234998.js')).registerApiGlobally();
14
14
  }
15
15
  function setupDefines(defines) {
16
16
  for (const key in defines)
@@ -4,7 +4,7 @@ import '@vitest/utils';
4
4
  function hasFailedSnapshot(suite) {
5
5
  return getTests(suite).some((s) => {
6
6
  var _a, _b;
7
- return (_b = (_a = s.result) == null ? void 0 : _a.errors) == null ? void 0 : _b.some((e) => e && e.message && e.message.match(/Snapshot .* mismatched/));
7
+ return (_b = (_a = s.result) == null ? void 0 : _a.errors) == null ? void 0 : _b.some((e) => typeof (e == null ? void 0 : e.message) === "string" && e.message.match(/Snapshot .* mismatched/));
8
8
  });
9
9
  }
10
10
  function getFullName(task, separator = " > ") {
@@ -7,7 +7,7 @@ import { c as commonjsGlobal } from './vendor-_commonjsHelpers.76cdd49e.js';
7
7
  import { equals, iterableEquality, subsetEquality, JestExtend, JestChaiExpect, JestAsymmetricMatchers, GLOBAL_EXPECT, getState, setState } from '@vitest/expect';
8
8
  import { SnapshotClient, stripSnapshotIndentation, addSerializer } from '@vitest/snapshot';
9
9
  import { g as getWorkerState, a as getCurrentEnvironment } from './vendor-global.6795f91f.js';
10
- import { g as getFullName } from './vendor-tasks.042d6084.js';
10
+ import { g as getFullName } from './vendor-tasks.f9d75aed.js';
11
11
  import require$$0 from 'util';
12
12
  import { spyOn, fn, isMockFunction, spies } from '@vitest/spy';
13
13
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "0.31.2",
4
+ "version": "0.31.3",
5
5
  "description": "A blazing fast unit test framework powered by Vite",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -148,12 +148,12 @@
148
148
  "tinypool": "^0.5.0",
149
149
  "vite": "^3.0.0 || ^4.0.0",
150
150
  "why-is-node-running": "^2.2.2",
151
- "@vitest/runner": "0.31.2",
152
- "vite-node": "0.31.2",
153
- "@vitest/expect": "0.31.2",
154
- "@vitest/spy": "0.31.2",
155
- "@vitest/utils": "0.31.2",
156
- "@vitest/snapshot": "0.31.2"
151
+ "@vitest/runner": "0.31.3",
152
+ "@vitest/spy": "0.31.3",
153
+ "@vitest/snapshot": "0.31.3",
154
+ "vite-node": "0.31.3",
155
+ "@vitest/expect": "0.31.3",
156
+ "@vitest/utils": "0.31.3"
157
157
  },
158
158
  "devDependencies": {
159
159
  "@ampproject/remapping": "^2.2.1",