Socket
Socket
Sign inDemoInstall

vitest

Package Overview
Dependencies
Maintainers
3
Versions
372
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vitest - npm Package Compare versions

Comparing version 1.0.0-beta.3 to 1.0.0-beta.4

dist/chunk-api-setup.6d19ab38.js

14

./dist/index.js
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
export { b as bench } from './vendor-benchmark.44931cfa.js';
export { i as isFirstRun, r as runOnce } from './vendor-run-once.3e5ef7d7.js';
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor-vi.d30b47ae.js';
import { d as dist } from './vendor-index.68ecee35.js';
export { b as assertType, g as getRunningMode, a as isWatchMode } from './vendor-index.68ecee35.js';
export { b as bench } from './vendor-benchmark.b6befc50.js';
export { i as isFirstRun, r as runOnce } from './vendor-run-once.fb836747.js';
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor-vi.3baa7c4a.js';
import { d as dist } from './vendor-index.72df742e.js';
export { c as assertType, g as getRunningMode, a as inject, b as isWatchMode } from './vendor-index.72df742e.js';
import * as chai from 'chai';

@@ -12,6 +12,6 @@ export { chai };

import '@vitest/utils';
import './vendor-index.29282562.js';
import './vendor-index.2b92937b.js';
import 'pathe';
import 'std-env';
import './vendor-global.97e4527c.js';
import './vendor-global.c3664e75.js';
import './vendor-_commonjsHelpers.7d1333e8.js';

@@ -18,0 +18,0 @@ import '@vitest/expect';

export { processError, startTests } from '@vitest/runner';
import { R as ResolvedConfig, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule } from './reporters-1678fe04.js';
import { R as ResolvedConfig, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule } from './reporters-50c2bd49.js';
import { VitestExecutor } from './execute.js';

@@ -15,3 +15,2 @@ import 'vite';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';

@@ -18,0 +17,0 @@ import 'chai';

export { processError, startTests } from '@vitest/runner';
import { setSafeTimers } from '@vitest/utils';
import { a as resetRunOnceCounter } from './vendor-run-once.3e5ef7d7.js';
import { a as resetRunOnceCounter } from './vendor-run-once.fb836747.js';
export { g as getCoverageProvider, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor-coverage.78040316.js';
import './vendor-global.97e4527c.js';
import './vendor-global.c3664e75.js';

@@ -16,3 +16,3 @@ let globalSetup = false;

if (config.globals)
(await import('./chunk-integrations-globals.9df12d91.js')).registerApiGlobally();
(await import('./chunk-integrations-globals.2b099e04.js')).registerApiGlobally();
}

@@ -19,0 +19,0 @@ function setupDefines(defines) {

@@ -7,4 +7,4 @@ import { performance } from 'node:perf_hooks';

import { l as loadEnvironment } from './vendor-loader.9c966f23.js';
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.e6e4e89b.js';
import { r as rpcDone, c as createSafeRpc } from './vendor-rpc.cbd8e972.js';
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.157302d6.js';
import { r as rpcDone, c as createSafeRpc } from './vendor-rpc.171f65fb.js';
import { s as setupInspect } from './vendor-inspector.209edf5a.js';

@@ -28,8 +28,8 @@ import 'pathe';

import './vendor-paths.84fc7a99.js';
import './vendor-global.97e4527c.js';
import './vendor-base.9c08bbd0.js';
import 'vite-node/constants';
import './vendor-global.c3664e75.js';
async function init(ctx) {
const { config, workerId: workerId$1 } = ctx;
const { config, workerId: workerId$1, providedContext } = ctx;
process.env.VITEST_WORKER_ID = String(workerId$1);

@@ -86,2 +86,3 @@ process.env.VITEST_POOL_ID = String(workerId);

rpc,
providedContext,
isChildProcess: true

@@ -88,0 +89,0 @@ };

import { normalize } from 'pathe';
import cac from 'cac';
import c from 'picocolors';
import { v as version, s as startVitest } from './vendor-node.327f8f1f.js';
import './vendor-index.29282562.js';
import { d as divider } from './vendor-reporters.b9600369.js';
import { v as version, s as startVitest } from './vendor-node.65461b16.js';
import './vendor-index.2b92937b.js';
import { d as divider } from './vendor-reporters.d24d80a4.js';
import { t as toArray } from './vendor-base.9c08bbd0.js';

@@ -57,3 +57,3 @@ import 'vite';

import 'readline';
import './vendor-global.97e4527c.js';
import './vendor-global.c3664e75.js';
import './chunk-runtime-console.f3263f87.js';

@@ -66,3 +66,3 @@ import 'node:stream';

const cli = cac("vitest");
cli.version(version).option("-r, --root <path>", "Root path").option("-c, --config <path>", "Path to config file").option("-u, --update", "Update snapshot").option("-w, --watch", "Enable watch mode").option("-t, --testNamePattern <pattern>", "Run tests with full names matching the specified regexp pattern").option("--dir <path>", "Base directory to scan for the test files").option("--ui", "Enable UI").option("--open", "Open UI automatically (default: !process.env.CI))").option("--api [api]", "Serve API, available options: --api.port <port>, --api.host [host] and --api.strictPort").option("--silent", "Silent console output from tests").option("--hideSkippedTests", "Hide logs for skipped tests").option("--reporter <name>", "Specify reporters").option("--outputFile <filename/-s>", "Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters").option("--coverage", "Enable coverage report").option("--run", "Disable watch mode").option("--mode <name>", "Override Vite mode (default: test)").option("--globals", "Inject apis globally").option("--dom", "Mock browser api with happy-dom").option("--browser [options]", "Run tests in the browser (default: false)").option("--pool <pool>", "Specify pool, if not running in the browser (default: threads)").option("--poolOptions <options>", "Specify pool options").option("--poolOptions.threads.isolate", "Isolate tests in threads pool (default: true)").option("--poolOptions.forks.isolate", "Isolate tests in forks pool (default: true)").option("--environment <env>", "Specify runner environment, if not running in the browser (default: node)").option("--passWithNoTests", "Pass when no tests found").option("--logHeapUsage", "Show the size of heap for each test").option("--allowOnly", "Allow tests and suites that are marked as only (default: !process.env.CI)").option("--dangerouslyIgnoreUnhandledErrors", "Ignore any unhandled errors that occur").option("--shard <shard>", "Test suite shard to execute in a format of <index>/<count>").option("--changed [since]", "Run tests that are affected by the changed files (default: false)").option("--sequence <options>", "Define in what order to run tests (use --sequence.shuffle to run tests in random order, use --sequence.concurrent to run tests in parallel)").option("--segfaultRetry <times>", "Return tests on segment fault (default: 0)", { default: 0 }).option("--no-color", "Removes colors from the console output").option("--inspect", "Enable Node.js inspector").option("--inspect-brk", "Enable Node.js inspector with break").option("--test-timeout <time>", "Default timeout of a test in milliseconds (default: 5000)").option("--bail <number>", "Stop test execution when given number of tests have failed", { default: 0 }).option("--retry <times>", "Retry the test specific number of times if it fails", { default: 0 }).option("--diff <path>", "Path to a diff config that will be used to generate diff interface").option("--typecheck [options]", "Custom options for typecheck pool").option("--typecheck.enabled", "Enable typechecking alongside tests (default: false)").option("--typecheck.only", "Run only typecheck tests. This automatically enables typecheck (default: false)").help();
cli.version(version).option("-r, --root <path>", "Root path").option("-c, --config <path>", "Path to config file").option("-u, --update", "Update snapshot").option("-w, --watch", "Enable watch mode").option("-t, --testNamePattern <pattern>", "Run tests with full names matching the specified regexp pattern").option("--dir <path>", "Base directory to scan for the test files").option("--ui", "Enable UI").option("--open", "Open UI automatically (default: !process.env.CI))").option("--api [api]", "Serve API, available options: --api.port <port>, --api.host [host] and --api.strictPort").option("--silent", "Silent console output from tests").option("--hideSkippedTests", "Hide logs for skipped tests").option("--reporter <name>", "Specify reporters").option("--outputFile <filename/-s>", "Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters").option("--coverage", "Enable coverage report", { default: { 100: false } }).option("--run", "Disable watch mode").option("--mode <name>", "Override Vite mode (default: test)").option("--globals", "Inject apis globally").option("--dom", "Mock browser api with happy-dom").option("--browser [options]", "Run tests in the browser (default: false)").option("--pool <pool>", "Specify pool, if not running in the browser (default: threads)").option("--poolOptions <options>", "Specify pool options").option("--poolOptions.threads.isolate", "Isolate tests in threads pool (default: true)").option("--poolOptions.forks.isolate", "Isolate tests in forks pool (default: true)").option("--environment <env>", "Specify runner environment, if not running in the browser (default: node)").option("--passWithNoTests", "Pass when no tests found").option("--logHeapUsage", "Show the size of heap for each test").option("--allowOnly", "Allow tests and suites that are marked as only (default: !process.env.CI)").option("--dangerouslyIgnoreUnhandledErrors", "Ignore any unhandled errors that occur").option("--shard <shard>", "Test suite shard to execute in a format of <index>/<count>").option("--changed [since]", "Run tests that are affected by the changed files (default: false)").option("--sequence <options>", "Define in what order to run tests (use --sequence.shuffle to run tests in random order, use --sequence.concurrent to run tests in parallel)").option("--segfaultRetry <times>", "Return tests on segment fault (default: 0)", { default: 0 }).option("--no-color", "Removes colors from the console output").option("--inspect", "Enable Node.js inspector").option("--inspect-brk", "Enable Node.js inspector with break").option("--test-timeout <time>", "Default timeout of a test in milliseconds (default: 5000)").option("--bail <number>", "Stop test execution when given number of tests have failed", { default: 0 }).option("--retry <times>", "Retry the test specific number of times if it fails", { default: 0 }).option("--diff <path>", "Path to a diff config that will be used to generate diff interface").option("--expand-snapshot-diff", "Show full diff when snapshot fails").option("--typecheck [options]", "Custom options for typecheck pool").option("--typecheck.enabled", "Enable typechecking alongside tests (default: false)").option("--typecheck.only", "Run only typecheck tests. This automatically enables typecheck (default: false)").help();
cli.command("run [...filters]").action(run);

@@ -73,2 +73,5 @@ cli.command("related [...filters]").action(runRelated);

cli.command("bench [...filters]").action(benchmark);
cli.command("typecheck [...filters]").action(() => {
throw new Error(`Running typecheck via "typecheck" command is removed. Please use "--typecheck" to run your regular tests alongside typechecking, or "--typecheck.only" to run only typecheck tests.`);
});
cli.command("[...filters]").action((filters, options) => start("test", filters, options));

@@ -75,0 +78,0 @@ try {

import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
import { a as ResolvedCoverageOptions, U as UserConfig, C as CoverageV8Options, P as ProjectConfig } from './reporters-1678fe04.js';
import { a as ResolvedCoverageOptions, U as UserConfig, C as CoverageV8Options, P as ProjectConfig } from './reporters-50c2bd49.js';
import '@vitest/runner';

@@ -15,3 +15,2 @@ import 'vite-node';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';

@@ -18,0 +17,0 @@ import 'chai';

@@ -12,2 +12,3 @@ import { isCI } from 'std-env';

"dist/**",
"**/[.]**",
"packages/*/test?(s)/**",

@@ -14,0 +15,0 @@ "**/*.d.ts",

@@ -1,2 +0,2 @@

import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-1678fe04.js';
import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-50c2bd49.js';
import 'vite';

@@ -14,3 +14,2 @@ import '@vitest/runner';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';

@@ -17,0 +16,0 @@ import 'chai';

@@ -8,6 +8,6 @@ import { isatty } from 'node:tty';

import { setupColors, createColors } from '@vitest/utils';
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.3d079eea.js';
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.57925a34.js';
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor-coverage.78040316.js';
import { g as getWorkerState } from './vendor-global.97e4527c.js';
import { i as index } from './vendor-index.68ecee35.js';
import { g as getWorkerState } from './vendor-global.c3664e75.js';
import { i as index } from './vendor-index.72df742e.js';
import { setupCommonEnv } from './browser.js';

@@ -19,9 +19,9 @@ import 'chai';

import 'node:url';
import './vendor-rpc.cbd8e972.js';
import './vendor-benchmark.44931cfa.js';
import './vendor-rpc.171f65fb.js';
import './vendor-benchmark.b6befc50.js';
import '@vitest/runner/utils';
import './vendor-index.29282562.js';
import './vendor-index.2b92937b.js';
import 'std-env';
import './vendor-run-once.3e5ef7d7.js';
import './vendor-vi.d30b47ae.js';
import './vendor-run-once.fb836747.js';
import './vendor-vi.3baa7c4a.js';
import './vendor-_commonjsHelpers.7d1333e8.js';

@@ -28,0 +28,0 @@ import '@vitest/expect';

import { performance } from 'node:perf_hooks';
import { startTests } from '@vitest/runner';
import './vendor-index.29282562.js';
import { a as globalExpect, r as resetModules, v as vi } from './vendor-vi.d30b47ae.js';
import './vendor-index.2b92937b.js';
import { a as globalExpect, r as resetModules, v as vi } from './vendor-vi.3baa7c4a.js';
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor-coverage.78040316.js';
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.3d079eea.js';
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.57925a34.js';
import { createRequire } from 'node:module';

@@ -13,5 +13,5 @@ import util from 'node:util';

import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
import { i as index } from './vendor-index.68ecee35.js';
import { i as index } from './vendor-index.72df742e.js';
import { setupCommonEnv } from './browser.js';
import { g as getWorkerState } from './vendor-global.97e4527c.js';
import { g as getWorkerState } from './vendor-global.c3664e75.js';
import 'pathe';

@@ -32,5 +32,5 @@ import 'std-env';

import 'node:url';
import './vendor-rpc.cbd8e972.js';
import './vendor-benchmark.44931cfa.js';
import './vendor-run-once.3e5ef7d7.js';
import './vendor-rpc.171f65fb.js';
import './vendor-benchmark.b6befc50.js';
import './vendor-run-once.fb836747.js';

@@ -37,0 +37,0 @@ let globalSetup = false;

@@ -1,2 +0,2 @@

import { E as Environment } from './reporters-1678fe04.js';
import { E as Environment } from './reporters-50c2bd49.js';
import 'vite';

@@ -14,3 +14,2 @@ import '@vitest/runner';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';

@@ -17,0 +16,0 @@ import 'chai';

import vm from 'node:vm';
import { ViteNodeRunner } from 'vite-node/client';
import { ViteNodeRunnerOptions } from 'vite-node';
import { ak as PendingSuiteMock, al as MockFactory, a0 as WorkerGlobalState, am as MockMap, O as RuntimeRPC } from './reporters-1678fe04.js';
import { al as PendingSuiteMock, am as MockFactory, an as MockMap, a1 as WorkerGlobalState, Q as RuntimeRPC } from './reporters-50c2bd49.js';
import 'vite';

@@ -15,3 +15,2 @@ import '@vitest/runner';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';

@@ -130,3 +129,3 @@ import 'chai';

};
get state(): WorkerGlobalState;
get state(): any;
shouldResolveId(id: string, _importee?: string | undefined): boolean;

@@ -133,0 +132,0 @@ originalResolveUrl(id: string, importer?: string): Promise<[url: string, fsPath: string]>;

@@ -1,2 +0,2 @@

export { V as VitestExecutor } from './vendor-execute.e6e4e89b.js';
export { V as VitestExecutor } from './vendor-execute.157302d6.js';
import 'node:url';

@@ -9,3 +9,2 @@ import 'node:vm';

import './vendor-paths.84fc7a99.js';
import './vendor-global.97e4527c.js';
import 'node:fs';

@@ -12,0 +11,0 @@ import '@vitest/utils';

import { TaskPopulated, File, TaskResultPack, CancelReason } from '@vitest/runner';
export { Custom, DoneCallback, ExtendedContext, File, HookCleanupCallback, HookListener, OnTestFailedHandler, RunMode, RuntimeContext, SequenceHooks, SequenceSetupFiles, Suite, SuiteAPI, SuiteCollector, SuiteFactory, SuiteHooks, Task, TaskBase, TaskContext, TaskCustomOptions, TaskMeta, TaskResult, TaskResultPack, TaskState, Test, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
export { b as bench } from './suite-0579b50d.js';
export { b as bench } from './suite-ad69b7cd.js';
import { ExpectStatic } from '@vitest/expect';
export { Assertion, AsymmetricMatchersContaining, ExpectStatic, JestAssertion } from '@vitest/expect';
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, k as RuntimeConfig, A as AfterSuiteRunMeta, l as UserConsoleLog, R as ResolvedConfig, m as ModuleGraphData, n as Reporter } from './reporters-1678fe04.js';
export { D as ApiConfig, a4 as ArgumentsType, a3 as Arrayable, a1 as Awaitable, B as BaseCoverageOptions, ai as BenchFunction, ag as Benchmark, aj as BenchmarkAPI, ah as BenchmarkResult, af as BenchmarkUserOptions, x as BuiltinEnvironment, z as CSSModuleScopeStrategy, q as CollectLineNumbers, r as CollectLines, a6 as Constructable, u as Context, Y as ContextRPC, S as ContextTestEnvironment, ad as CoverageIstanbulOptions, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule, ac as CoverageReporter, C as CoverageV8Options, ae as CustomProviderOptions, I as DepsOptimizationOptions, E as Environment, G as EnvironmentOptions, a8 as EnvironmentReturn, H as HappyDOMOptions, L as InlineConfig, J as JSDOMOptions, a7 as ModuleCache, a5 as MutableArray, a2 as Nullable, aa as OnServerRestartHandler, v as Pool, w as PoolOptions, P as ProjectConfig, o as RawErrsMap, ab as ReportContext, _ as ResolveIdFunction, a as ResolvedCoverageOptions, X as ResolvedTestEnvironment, t as RootAndTarget, Q as RunnerRPC, O as RuntimeRPC, K as TransformModePatterns, p as TscErrorInfo, N as TypecheckConfig, U as UserConfig, e as Vitest, y as VitestEnvironment, V as VitestRunMode, a9 as VmEnvironmentReturn, Z as WorkerContext, a0 as WorkerGlobalState, $ as WorkerRPC } from './reporters-1678fe04.js';
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, EnhancedSpy } from '@vitest/spy';
export { EnhancedSpy, Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject, SpyInstance } from '@vitest/spy';
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, l as RuntimeConfig, f as ProvidedContext, A as AfterSuiteRunMeta, m as UserConsoleLog, R as ResolvedConfig, n as ModuleGraphData, o as Reporter } from './reporters-50c2bd49.js';
export { G as ApiConfig, a5 as ArgumentsType, a4 as Arrayable, a2 as Awaitable, B as BaseCoverageOptions, aj as BenchFunction, ah as Benchmark, ak as BenchmarkAPI, ai as BenchmarkResult, ag as BenchmarkUserOptions, y as BuiltinEnvironment, D as CSSModuleScopeStrategy, r as CollectLineNumbers, t as CollectLines, a7 as Constructable, v as Context, Z as ContextRPC, X as ContextTestEnvironment, ae as CoverageIstanbulOptions, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule, ad as CoverageReporter, C as CoverageV8Options, af as CustomProviderOptions, K as DepsOptimizationOptions, E as Environment, I as EnvironmentOptions, a9 as EnvironmentReturn, H as HappyDOMOptions, N as InlineConfig, J as JSDOMOptions, a8 as ModuleCache, a6 as MutableArray, a3 as Nullable, ab as OnServerRestartHandler, w as Pool, x as PoolOptions, P as ProjectConfig, p as RawErrsMap, ac as ReportContext, $ as ResolveIdFunction, a as ResolvedCoverageOptions, Y as ResolvedTestEnvironment, u as RootAndTarget, S as RunnerRPC, Q as RuntimeRPC, L as TransformModePatterns, q as TscErrorInfo, O as TypecheckConfig, U as UserConfig, e as Vitest, z as VitestEnvironment, V as VitestRunMode, aa as VmEnvironmentReturn, _ as WorkerContext, a1 as WorkerGlobalState, a0 as WorkerRPC } from './reporters-50c2bd49.js';
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject, SpyInstance } from '@vitest/spy';
export { SnapshotEnvironment } from '@vitest/snapshot/environment';

@@ -27,3 +27,2 @@ import { SnapshotResult } from '@vitest/snapshot';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';

@@ -230,48 +229,191 @@

type ESModuleExports = Record<string, unknown>;
interface VitestUtils {
/**
* Checks if fake timers are enabled.
*/
isFakeTimers(): boolean;
useFakeTimers(config?: FakeTimerInstallOpts): this;
useRealTimers(): this;
runOnlyPendingTimers(): this;
runOnlyPendingTimersAsync(): Promise<this>;
runAllTimers(): this;
runAllTimersAsync(): Promise<this>;
runAllTicks(): this;
advanceTimersByTime(ms: number): this;
advanceTimersByTimeAsync(ms: number): Promise<this>;
advanceTimersToNextTimer(): this;
advanceTimersToNextTimerAsync(): Promise<this>;
/**
* This method wraps all further calls to timers until [`vi.useRealTimers()`](https://vitest.dev/api/vi#vi-userealtimers) is called.
*/
useFakeTimers(config?: FakeTimerInstallOpts): VitestUtils;
/**
* Restores mocked timers to their original implementations. All timers that were scheduled before will be discarded.
*/
useRealTimers(): VitestUtils;
/**
* This method will call every timer that was initiated after [`vi.useFakeTimers`](https://vitest.dev/api/vi#vi-usefaketimers) call.
* It will not fire any timer that was initiated during its call.
*/
runOnlyPendingTimers(): VitestUtils;
/**
* This method will asynchronously call every timer that was initiated after [`vi.useFakeTimers`](https://vitest.dev/api/vi#vi-usefaketimers) call, even asynchronous ones.
* It will not fire any timer that was initiated during its call.
*/
runOnlyPendingTimersAsync(): Promise<VitestUtils>;
/**
* This method will invoke every initiated timer until the timer queue is empty. It means that every timer called during `runAllTimers` will be fired.
* If you have an infinite interval, it will throw after 10,000 tries (can be configured with [`fakeTimers.loopLimit`](https://vitest.dev/config/#faketimers-looplimit)).
*/
runAllTimers(): VitestUtils;
/**
* This method will asynchronously invoke every initiated timer until the timer queue is empty. It means that every timer called during `runAllTimersAsync` will be fired even asynchronous timers.
* If you have an infinite interval, it will throw after 10 000 tries (can be configured with [`fakeTimers.loopLimit`](https://vitest.dev/config/#faketimers-looplimit)).
*/
runAllTimersAsync(): Promise<VitestUtils>;
/**
* Calls every microtask that was queued by `process.nextTick`. This will also run all microtasks scheduled by themselves.
*/
runAllTicks(): VitestUtils;
/**
* This method will invoke every initiated timer until the specified number of milliseconds is passed or the queue is empty - whatever comes first.
*/
advanceTimersByTime(ms: number): VitestUtils;
/**
* This method will invoke every initiated timer until the specified number of milliseconds is passed or the queue is empty - whatever comes first. This will include and await asynchronously set timers.
*/
advanceTimersByTimeAsync(ms: number): Promise<VitestUtils>;
/**
* Will call next available timer. Useful to make assertions between each timer call. You can chain call it to manage timers by yourself.
*/
advanceTimersToNextTimer(): VitestUtils;
/**
* Will call next available timer and wait until it's resolved if it was set asynchronously. Useful to make assertions between each timer call.
*/
advanceTimersToNextTimerAsync(): Promise<VitestUtils>;
/**
* Get the number of waiting timers.
*/
getTimerCount(): number;
setSystemTime(time: number | string | Date): this;
/**
* If fake timers are enabled, this method simulates a user changing the system clock (will affect date related API like `hrtime`, `performance.now` or `new Date()`) - however, it will not fire any timers.
* If fake timers are not enabled, this method will only mock `Date.*` and `new Date()` calls.
*/
setSystemTime(time: number | string | Date): VitestUtils;
/**
* Returns mocked current date that was set using `setSystemTime`. If date is not mocked the method will return `null`.
*/
getMockedSystemTime(): Date | null;
/**
* When using `vi.useFakeTimers`, `Date.now` calls are mocked. If you need to get real time in milliseconds, you can call this function.
*/
getRealSystemTime(): number;
clearAllTimers(): this;
/**
* Removes all timers that are scheduled to run. These timers will never run in the future.
*/
clearAllTimers(): VitestUtils;
/**
* Creates a spy on a method or getter/setter of an object similar to [`vi.fn()`](https://vitest.dev/api/vi#vi-fn). It returns a [mock function](https://vitest.dev/api/mock).
*
* @example
* const cart = {
* getApples: () => 42
* }
*
* const spy = vi.spyOn(cart, 'getApples').mockReturnValue(10)
*
* expect(cart.getApples()).toBe(10)
* expect(spy).toHaveBeenCalled()
* expect(spy).toHaveReturnedWith(10)
*/
spyOn: typeof spyOn;
/**
* Creates a spy on a function, though can be initiated without one. Every time a function is invoked, it stores its call arguments, returns, and instances. Also, you can manipulate its behavior with [methods](https://vitest.dev/api/mock).
*
* If no function is given, mock will return `undefined`, when invoked.
*
* @example
* const getApples = vi.fn(() => 0)
*
* getApples()
*
* expect(getApples).toHaveBeenCalled()
* expect(getApples).toHaveReturnedWith(0)
*
* getApples.mockReturnValueOnce(5)
*
* expect(getApples()).toBe(5)
* expect(getApples).toHaveNthReturnedWith(2, 5)
*/
fn: typeof fn;
/**
* Wait for the callback to execute successfully. If the callback throws an error or returns a rejected promise it will continue to wait until it succeeds or times out.
*
* This is very useful when you need to wait for some asynchronous action to complete, for example, when you start a server and need to wait for it to start.
*
* @example
* const server = createServer()
*
* await vi.waitFor(
* () => {
* if (!server.isReady)
* throw new Error('Server not started')
*
* console.log('Server started')
* }, {
* timeout: 500, // default is 1000
* interval: 20, // default is 50
* }
* )
*/
waitFor: typeof waitFor;
/**
* This is similar to [`vi.waitFor`](https://vitest.dev/api/vi#vi-waitfor), but if the callback throws any errors, execution is immediately interrupted and an error message is received.
*
* If the callback returns a falsy value, the next check will continue until a truthy value is returned. This is useful when you need to wait for something to exist before taking the next step.
*
* @example
* const element = await vi.waitUntil(
* () => document.querySelector('.element'),
* {
* timeout: 500, // default is 1000
* interval: 20, // default is 50
* }
* )
*
* // do something with the element
* expect(element.querySelector('.element-child')).toBeTruthy()
*/
waitUntil: typeof waitUntil;
/**
* Run the factory before imports are evaluated. You can return a value from the factory
* to reuse it inside your `vi.mock` factory and tests.
* to reuse it inside your [`vi.mock`](https://vitest.dev/api/vi#vi-mock) factory and tests.
*
* If used with [`vi.mock`](https://vitest.dev/api/vi#vi-mock), both will be hoisted in the order they are defined in.
*/
hoisted<T>(factory: () => T): T;
/**
* Makes all `imports` to passed module to be mocked.
* - If there is a factory, will return it's result. The call to `vi.mock` is hoisted to the top of the file,
* so you don't have access to variables declared in the global file scope, if you didn't put them before imports!
* - If `__mocks__` folder with file of the same name exist, all imports will
* return it.
* - If there is no `__mocks__` folder or a file with the same name inside, will call original
* module and mock it.
* @param path Path to the module. Can be aliased, if your config supports it
* @param factory Factory for the mocked module. Has the highest priority.
* Mocks every import call to the module even if it was already statically imported.
*
* The call to `vi.mock` is hoisted to the top of the file, so you don't have access to variables declared in the global file scope
* unless they are defined with [`vi.hoisted`](https://vitest.dev/api/vi#vi-hoisted) before this call.
*
* Mocking algorithm is described in [documentation](https://vitest.dev/guide/mocking#modules).
* @param path Path to the module. Can be aliased, if your Vitest config supports it
* @param factory Mocked module factory. The result of this function will be an exports object
*/
mock(path: string, factory?: MockFactoryWithHelper): void;
/**
* Removes module from mocked registry. All subsequent calls to import will
* return original module even if it was mocked.
* @param path Path to the module. Can be aliased, if your config supports it
* Removes module from mocked registry. All calls to import will return the original module even if it was mocked before.
*
* This call is hoisted to the top of the file, so it will only unmock modules that were defined in `setupFiles`, for example.
* @param path Path to the module. Can be aliased, if your Vitest config supports it
*/
unmock(path: string): void;
doMock(path: string, factory?: () => any): void;
/**
* Mocks every subsequent [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) call.
*
* Unlike [`vi.mock`](https://vitest.dev/api/vi#vi-mock), this method will not mock statically imported modules because it is not hoisted to the top of the file.
*
* Mocking algorithm is described in [documentation](https://vitest.dev/guide/mocking#modules).
* @param path Path to the module. Can be aliased, if your Vitest config supports it
* @param factory Mocked module factory. The result of this function will be an exports object
*/
doMock(path: string, factory?: MockFactoryWithHelper): void;
/**
* Removes module from mocked registry. All subsequent calls to import will return original module.
*
* Unlike [`vi.unmock`](https://vitest.dev/api/vi#vi-unmock), this method is not hoisted to the top of the file.
* @param path Path to the module. Can be aliased, if your Vitest config supports it
*/
doUnmock(path: string): void;

@@ -282,4 +424,4 @@ /**

* @example
* vi.mock('./example', async () => {
* const axios = await vi.importActual('./example')
* vi.mock('./example.js', async () => {
* const axios = await vi.importActual<typeof import('./example.js')>('./example.js')
*

@@ -289,26 +431,28 @@ * return { ...axios, get: vi.fn() }

* @param path Path to the module. Can be aliased, if your config supports it
* @returns Actual module without spies
*/
importActual<T = unknown>(path: string): Promise<T>;
importActual<T = ESModuleExports>(path: string): Promise<T>;
/**
* Imports a module with all of its properties and nested properties mocked.
* For the rules applied, see docs.
*
* Mocking algorithm is described in [documentation](https://vitest.dev/guide/mocking#modules).
* @example
* const example = await vi.importMock<typeof import('./example.js')>('./example.js')
* example.calc.mockReturnValue(10)
* expect(example.calc()).toBe(10)
* @param path Path to the module. Can be aliased, if your config supports it
* @returns Fully mocked module
*/
importMock<T>(path: string): Promise<MaybeMockedDeep<T>>;
importMock<T = ESModuleExports>(path: string): Promise<MaybeMockedDeep<T>>;
/**
* Type helpers for TypeScript. In reality just returns the object that was passed.
* Type helper for TypeScript. Just returns the object that was passed.
*
* When `partial` is `true` it will expect a `Partial<T>` as a return value.
* When `partial` is `true` it will expect a `Partial<T>` as a return value. By default, this will only make TypeScript believe that
* the first level values are mocked. You can pass down `{ deep: true }` as a second argument to tell TypeScript that the whole object is mocked, if it actually is.
* @example
* import example from './example'
* vi.mock('./example')
* import example from './example.js'
* vi.mock('./example.js')
*
* test('1+1 equals 2' async () => {
* vi.mocked(example.calc).mockRestore()
*
* const res = example.calc(1, '+', 1)
*
* expect(res).toBe(2)
* test('1 + 1 equals 10' async () => {
* vi.mocked(example.calc).mockReturnValue(10)
* expect(example.calc(1, '+', 1)).toBe(10)
* })

@@ -338,7 +482,23 @@ * @param item Anything that can be mocked

mocked<T>(item: T): MaybeMocked<T>;
isMockFunction(fn: any): fn is EnhancedSpy;
clearAllMocks(): this;
resetAllMocks(): this;
restoreAllMocks(): this;
/**
* Checks that a given parameter is a mock function. If you are using TypeScript, it will also narrow down its type.
*/
isMockFunction(fn: any): fn is MockInstance;
/**
* Calls [`.mockClear()`](https://vitest.dev/api/mock#mockclear) on every mocked function. This will only empty `.mock` state, it will not reset implementation.
*
* It is useful if you need to clean up mock between different assertions.
*/
clearAllMocks(): VitestUtils;
/**
* Calls [`.mockReset()`](https://vitest.dev/api/mock#mockreset) on every mocked function. This will empty `.mock` state, reset "once" implementations and force the base implementation to return `undefined` when invoked.
*
* This is useful when you want to completely reset a mock to the default state.
*/
resetAllMocks(): VitestUtils;
/**
* Calls [`.mockRestore()`](https://vitest.dev/api/mock#mockrestore) on every mocked function. This will restore all original implementations.
*/
restoreAllMocks(): VitestUtils;
/**
* Makes value available on global namespace.

@@ -348,3 +508,3 @@ * Useful, if you want to have global variables available, like `IntersectionObserver`.

*/
stubGlobal(name: string | symbol | number, value: unknown): this;
stubGlobal(name: string | symbol | number, value: unknown): VitestUtils;
/**

@@ -354,13 +514,19 @@ * Changes the value of `import.meta.env` and `process.env`.

*/
stubEnv(name: string, value: string): this;
stubEnv(name: string, value: string): VitestUtils;
/**
* Reset the value to original value that was available before first `vi.stubGlobal` was called.
*/
unstubAllGlobals(): this;
unstubAllGlobals(): VitestUtils;
/**
* Reset environmental variables to the ones that were available before first `vi.stubEnv` was called.
*/
unstubAllEnvs(): this;
resetModules(): this;
unstubAllEnvs(): VitestUtils;
/**
* Resets modules registry by clearing the cache of all modules. This allows modules to be reevaluated when reimported.
* Top-level imports cannot be re-evaluated. Might be useful to isolate modules where local state conflicts between tests.
*
* This method does not reset mocks registry. To clear mocks registry, use [`vi.unmock`](https://vitest.dev/api/vi#vi-unmock) or [`vi.doUnmock`](https://vitest.dev/api/vi#vi-dounmock).
*/
resetModules(): VitestUtils;
/**
* Wait for all imports to load. Useful, if you have a synchronous call that starts

@@ -383,5 +549,11 @@ * importing a module that you cannot await otherwise.

declare function getRunningMode(): "watch" | "run";
declare function getRunningMode(): "run" | "watch";
declare function isWatchMode(): boolean;
/**
* Gives access to injected context provided from the main thread.
* This usually returns a value provided by `globalSetup` or an external library.
*/
declare function inject<T extends keyof ProvidedContext>(key: T): ProvidedContext[T];
interface TransformResultWithSource extends TransformResult {

@@ -414,2 +586,3 @@ source?: string;

updateSnapshot(file?: File): Promise<void>;
getProvidedContext(): ProvidedContext;
}

@@ -420,2 +593,2 @@ interface WebSocketEvents extends Pick<Reporter, 'onCollected' | 'onFinished' | 'onTaskUpdate' | 'onUserConsoleLog' | 'onPathsCollected'> {

export { AfterSuiteRunMeta, type AssertType, type ExpectTypeOf, ModuleGraphData, Reporter, ResolvedConfig, RuntimeConfig, type TransformResultWithSource, UserConsoleLog, type VitestUtils, type WebSocketEvents, type WebSocketHandlers, assertType, createExpect, globalExpect as expect, expectTypeOf, getRunningMode, isFirstRun, isWatchMode, runOnce, vi, vitest };
export { AfterSuiteRunMeta, type AssertType, type ExpectTypeOf, ModuleGraphData, ProvidedContext, Reporter, ResolvedConfig, RuntimeConfig, type TransformResultWithSource, UserConsoleLog, type VitestUtils, type WebSocketEvents, type WebSocketHandlers, assertType, createExpect, globalExpect as expect, expectTypeOf, getRunningMode, inject, isFirstRun, isWatchMode, runOnce, vi, vitest };
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
export { b as bench } from './vendor-benchmark.44931cfa.js';
export { i as isFirstRun, r as runOnce } from './vendor-run-once.3e5ef7d7.js';
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor-vi.d30b47ae.js';
import { d as dist } from './vendor-index.68ecee35.js';
export { b as assertType, g as getRunningMode, a as isWatchMode } from './vendor-index.68ecee35.js';
export { b as bench } from './vendor-benchmark.b6befc50.js';
export { i as isFirstRun, r as runOnce } from './vendor-run-once.fb836747.js';
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor-vi.3baa7c4a.js';
import { d as dist } from './vendor-index.72df742e.js';
export { c as assertType, g as getRunningMode, a as inject, b as isWatchMode } from './vendor-index.72df742e.js';
import * as chai from 'chai';

@@ -12,6 +12,6 @@ export { chai };

import '@vitest/utils';
import './vendor-index.29282562.js';
import './vendor-index.2b92937b.js';
import 'pathe';
import 'std-env';
import './vendor-global.97e4527c.js';
import './vendor-global.c3664e75.js';
import './vendor-_commonjsHelpers.7d1333e8.js';

@@ -18,0 +18,0 @@ import '@vitest/expect';

@@ -1,3 +0,3 @@

import { V as VitestRunMode, U as UserConfig, e as Vitest, T as TestSequencer, W as WorkspaceSpec } from './reporters-1678fe04.js';
export { i as BrowserProvider, h as BrowserProviderInitializationOptions, j as BrowserProviderOptions, g as TestSequencerConstructor, f as WorkspaceProject, s as startVitest } from './reporters-1678fe04.js';
import { V as VitestRunMode, U as UserConfig, e as Vitest, R as ResolvedConfig, f as ProvidedContext, T as TestSequencer, W as WorkspaceSpec } from './reporters-50c2bd49.js';
export { j as BrowserProvider, i as BrowserProviderInitializationOptions, k as BrowserProviderOptions, h as TestSequencerConstructor, g as WorkspaceProject, s as startVitest } from './reporters-50c2bd49.js';
import { UserConfig as UserConfig$1, Plugin } from 'vite';

@@ -15,3 +15,2 @@ import '@vitest/runner';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';

@@ -26,2 +25,7 @@ import 'chai';

interface GlobalSetupContext {
config: ResolvedConfig;
provide<T extends keyof ProvidedContext>(key: T, value: ProvidedContext[T]): void;
}
declare class BaseSequencer implements TestSequencer {

@@ -36,2 +40,2 @@ protected ctx: Vitest;

export { BaseSequencer, TestSequencer, Vitest, VitestPlugin, WorkspaceSpec, createVitest, ensurePackageInstalled, registerConsoleShortcuts };
export { BaseSequencer, type GlobalSetupContext, TestSequencer, Vitest, VitestPlugin, WorkspaceSpec, createVitest, ensurePackageInstalled, registerConsoleShortcuts };

@@ -1,2 +0,2 @@

export { B as BaseSequencer, V as VitestPlugin, c as createVitest, e as ensurePackageInstalled, r as registerConsoleShortcuts, s as startVitest } from './vendor-node.327f8f1f.js';
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, e as ensurePackageInstalled, r as registerConsoleShortcuts, s as startVitest } from './vendor-node.65461b16.js';
import 'pathe';

@@ -21,7 +21,7 @@ import 'vite';

import 'vite-node/server';
import './vendor-index.29282562.js';
import './vendor-index.2b92937b.js';
import 'std-env';
import '@vitest/runner/utils';
import '@vitest/utils';
import './vendor-global.97e4527c.js';
import './vendor-global.c3664e75.js';
import './vendor-coverage.78040316.js';

@@ -50,3 +50,3 @@ import './vendor-paths.84fc7a99.js';

import 'acorn-walk';
import './vendor-reporters.b9600369.js';
import './vendor-reporters.d24d80a4.js';
import './chunk-runtime-console.f3263f87.js';

@@ -53,0 +53,0 @@ import 'node:stream';

@@ -1,2 +0,2 @@

export { aw as BaseReporter, ao as BasicReporter, aA as BenchmarkBuiltinReporters, az as BenchmarkReportsMap, ay as BuiltinReporters, an as DefaultReporter, ap as DotReporter, av as HangingProcessReporter, at as JUnitReporter, aq as JsonReporter, n as Reporter, ax as ReportersMap, au as TapFlatReporter, as as TapReporter, ar as VerboseReporter } from './reporters-1678fe04.js';
export { ax as BaseReporter, ap as BasicReporter, aB as BenchmarkBuiltinReporters, aA as BenchmarkReportsMap, az as BuiltinReporters, ao as DefaultReporter, aq as DotReporter, aw as HangingProcessReporter, au as JUnitReporter, ar as JsonReporter, o as Reporter, ay as ReportersMap, av as TapFlatReporter, at as TapReporter, as as VerboseReporter } from './reporters-50c2bd49.js';
import 'vite';

@@ -14,4 +14,3 @@ import '@vitest/runner';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';
import 'chai';

@@ -1,5 +0,5 @@

export { f as BasicReporter, B as BenchmarkReportsMap, D as DefaultReporter, g as DotReporter, H as HangingProcessReporter, h as JUnitReporter, J as JsonReporter, R as ReportersMap, i as TapFlatReporter, T as TapReporter, V as VerboseReporter } from './vendor-reporters.b9600369.js';
export { b as BasicReporter, B as BenchmarkReportsMap, D as DefaultReporter, e as DotReporter, H as HangingProcessReporter, f as JUnitReporter, J as JsonReporter, R as ReportersMap, g as TapFlatReporter, T as TapReporter, V as VerboseReporter } from './vendor-reporters.d24d80a4.js';
import 'node:perf_hooks';
import 'picocolors';
import './vendor-index.29282562.js';
import './vendor-index.2b92937b.js';
import 'pathe';

@@ -9,3 +9,3 @@ import 'std-env';

import '@vitest/utils';
import './vendor-global.97e4527c.js';
import './vendor-global.c3664e75.js';
import './chunk-runtime-console.f3263f87.js';

@@ -12,0 +12,0 @@ import 'node:stream';

import { VitestRunner, VitestRunnerImportSource, Suite, Test, CancelReason, Custom, TaskContext, ExtendedContext } from '@vitest/runner';
import { R as ResolvedConfig } from './reporters-1678fe04.js';
import { R as ResolvedConfig } from './reporters-50c2bd49.js';
import * as tinybench from 'tinybench';

@@ -14,3 +14,2 @@ import 'vite';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';

@@ -17,0 +16,0 @@ import 'chai';

import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
import { g as getSnapshotClient, c as createExpect, v as vi } from './vendor-vi.d30b47ae.js';
import './vendor-index.29282562.js';
import { a as rpc } from './vendor-rpc.cbd8e972.js';
import { g as getSnapshotClient, c as createExpect, v as vi } from './vendor-vi.3baa7c4a.js';
import './vendor-index.2b92937b.js';
import { a as rpc } from './vendor-rpc.171f65fb.js';
import { g as getFullName } from './vendor-tasks.f9d75aed.js';
import { g as getWorkerState } from './vendor-global.97e4527c.js';
import { g as getWorkerState } from './vendor-global.c3664e75.js';
import { getNames } from '@vitest/runner/utils';
import { performance } from 'node:perf_hooks';
import { updateTask } from '@vitest/runner';
import { createDefer, getSafeTimers } from '@vitest/utils';
import { a as getBenchOptions, g as getBenchFn } from './vendor-benchmark.44931cfa.js';
import { a as getBenchOptions, g as getBenchFn } from './vendor-benchmark.b6befc50.js';
import 'chai';

@@ -13,0 +12,0 @@ import './vendor-_commonjsHelpers.7d1333e8.js';

export { createTaskCollector, getCurrentSuite, getFn, setFn } from '@vitest/runner';
export { createChainable } from '@vitest/runner/utils';
export { g as getBenchFn, a as getBenchOptions } from './suite-0579b50d.js';
import './reporters-1678fe04.js';
export { g as getBenchFn, a as getBenchOptions } from './suite-ad69b7cd.js';
import './reporters-50c2bd49.js';
import 'vite';

@@ -15,4 +15,3 @@ import 'vite-node';

import 'node:worker_threads';
import 'rollup';
import 'node:fs';
import 'chai';
export { createTaskCollector, getCurrentSuite, getFn, setFn } from '@vitest/runner';
export { createChainable } from '@vitest/runner/utils';
export { g as getBenchFn, a as getBenchOptions } from './vendor-benchmark.44931cfa.js';
export { g as getBenchFn, a as getBenchOptions } from './vendor-benchmark.b6befc50.js';
import '@vitest/utils';
import './vendor-index.29282562.js';
import './vendor-index.2b92937b.js';
import 'pathe';
import 'std-env';
import './vendor-global.97e4527c.js';
import './vendor-global.c3664e75.js';

@@ -11,5 +11,5 @@ import { pathToFileURL } from 'node:url';

import { l as loadEnvironment } from './vendor-loader.9c966f23.js';
import { b as startVitestExecutor } from './vendor-execute.e6e4e89b.js';
import { b as startVitestExecutor } from './vendor-execute.157302d6.js';
import { createCustomConsole } from './chunk-runtime-console.f3263f87.js';
import { c as createSafeRpc } from './vendor-rpc.cbd8e972.js';
import { c as createSafeRpc } from './vendor-rpc.171f65fb.js';
import 'acorn';

@@ -28,3 +28,2 @@ import 'node:module';

import '@vitest/utils/error';
import './vendor-global.97e4527c.js';
import '@vitest/utils';

@@ -35,2 +34,3 @@ import './vendor-base.9c08bbd0.js';

import './vendor-date.6e993429.js';
import './vendor-global.c3664e75.js';

@@ -42,3 +42,3 @@ const entryFile = pathToFileURL(resolve(distDir, "entry-vm.js")).href;

const mockMap = /* @__PURE__ */ new Map();
const { config, port } = ctx;
const { config, port, providedContext } = ctx;
let setCancel = (_reason) => {

@@ -86,3 +86,4 @@ };

},
rpc
rpc,
providedContext
};

@@ -89,0 +90,0 @@ installSourcemapsSupport({

import { performance } from 'node:perf_hooks';
import { c as createBirpc } from './vendor-index.1ca68bd5.js';
import { workerId } from 'tinypool';
import { g as getWorkerState } from './vendor-global.97e4527c.js';
import { g as getWorkerState } from './vendor-global.c3664e75.js';
import { l as loadEnvironment } from './vendor-loader.9c966f23.js';
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.e6e4e89b.js';
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.157302d6.js';
import { s as setupInspect } from './vendor-inspector.209edf5a.js';
import { r as rpcDone, c as createSafeRpc } from './vendor-rpc.cbd8e972.js';
import { r as rpcDone, c as createSafeRpc } from './vendor-rpc.171f65fb.js';
import 'pathe';

@@ -37,3 +37,3 @@ import 'acorn';

throw new Error(`worker for ${ctx.files.join(",")} already initialized by ${getWorkerState().ctx.files.join(",")}. This is probably an internal bug of Vitest.`);
const { config, port, workerId: workerId$1 } = ctx;
const { config, port, workerId: workerId$1, providedContext } = ctx;
process.env.VITEST_WORKER_ID = String(workerId$1);

@@ -78,3 +78,4 @@ process.env.VITEST_POOL_ID = String(workerId);

},
rpc
rpc,
providedContext
};

@@ -81,0 +82,0 @@ Object.defineProperty(globalThis, "__vitest_worker__", {

{
"name": "vitest",
"type": "module",
"version": "1.0.0-beta.3",
"version": "1.0.0-beta.4",
"description": "Next generation testing framework powered by Vite",

@@ -147,8 +147,8 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>",

"why-is-node-running": "^2.2.2",
"@vitest/expect": "1.0.0-beta.3",
"@vitest/runner": "1.0.0-beta.3",
"@vitest/snapshot": "1.0.0-beta.3",
"@vitest/spy": "1.0.0-beta.3",
"@vitest/utils": "1.0.0-beta.3",
"vite-node": "1.0.0-beta.3"
"@vitest/spy": "1.0.0-beta.4",
"@vitest/expect": "1.0.0-beta.4",
"@vitest/runner": "1.0.0-beta.4",
"@vitest/snapshot": "1.0.0-beta.4",
"@vitest/utils": "1.0.0-beta.4",
"vite-node": "1.0.0-beta.4"
},

@@ -179,3 +179,3 @@ "devDependencies": {

"jsdom": "^22.1.0",
"log-update": "^5.0.1",
"log-update": "^6.0.0",
"micromatch": "^4.0.5",

@@ -182,0 +182,0 @@ "mlly": "^1.4.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc