vitest 4.0.0-beta.1 → 4.0.0-beta.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 +6 -6
- package/dist/browser.js +1 -1
- package/dist/chunks/{base.Bj3pWTr1.js → base.D5_IXzht.js} +2 -2
- package/dist/chunks/{benchmark.d.BwvBVTda.d.ts → benchmark.d.DAaHLpsq.d.ts} +4 -4
- package/dist/chunks/{browser.d.q8Z0P0q1.d.ts → browser.d.BSPEQIuf.d.ts} +5 -5
- package/dist/chunks/{cac.D3EzDDZd.js → cac.C30xmylc.js} +11 -18
- package/dist/chunks/{cli-api.Dn5gKePv.js → cli-api.DE98RCgs.js} +53 -80
- package/dist/chunks/{config.d.HJdfX-8k.d.ts → config.d.DZo8c7fw.d.ts} +58 -58
- package/dist/chunks/{console.CtFJOzRO.js → console.DoJHFxmj.js} +3 -3
- package/dist/chunks/{constants.DnKduX2e.js → constants.CXzqaLmq.js} +1 -4
- package/dist/chunks/{coverage.Cwa-XhJt.js → coverage.OOpN1tMC.js} +54 -46
- package/dist/chunks/{coverage.d.S9RMNXIe.d.ts → coverage.d.CNYjU4GF.d.ts} +4 -4
- package/dist/chunks/{creator.GK6I-cL4.js → creator.CJNzQTzZ.js} +5 -5
- package/dist/chunks/{environment.d.CUq4cUgQ.d.ts → environment.d.Bhm9oc0v.d.ts} +1 -1
- package/dist/chunks/{execute.B7h3T_Hc.js → execute.Dt-pCVcL.js} +1 -1
- package/dist/chunks/{global.d.CVbXEflG.d.ts → global.d.DAhT2emn.d.ts} +2 -2
- package/dist/chunks/{globals.Cxal6MLI.js → globals.Dgo-vS5G.js} +3 -3
- package/dist/chunks/{index.CZI_8rVt.js → index.Bz6b0Ib7.js} +5 -5
- package/dist/chunks/{index.BWf_gE5n.js → index.D1_MsKEt.js} +1 -1
- package/dist/chunks/{index.TfbsX-3I.js → index.D3SKT3tv.js} +1 -1
- package/dist/chunks/{index.D-VkfKhf.js → index.Dppt57hu.js} +1 -1
- package/dist/chunks/{plugin.d.C2EcJUjo.d.ts → plugin.d.CKCmge5g.d.ts} +1 -1
- package/dist/chunks/{reporters.d.DxZg19fy.d.ts → reporters.d.BBuiUFDc.d.ts} +115 -145
- package/dist/chunks/{runBaseTests.BC7ZIH5L.js → runBaseTests.Bbi_gTJQ.js} +5 -5
- package/dist/chunks/{setup-common.D7ZqXFx-.js → setup-common.Ebx5x0eP.js} +1 -1
- package/dist/chunks/{suite.d.FvehnV49.d.ts → suite.d.BJWk38HB.d.ts} +1 -1
- package/dist/chunks/{typechecker.CVytUJuF.js → typechecker.CMNPqJOo.js} +3 -3
- package/dist/chunks/{utils.CAioKnHs.js → utils.CcGm2cd1.js} +1 -1
- package/dist/chunks/{vi.bdSIJ99Y.js → vi.CA0EPI9Y.js} +11 -11
- package/dist/chunks/{vm.BThCzidc.js → vm.BUnLJt_P.js} +11 -3
- package/dist/chunks/{worker.d.CmvJfRGs.d.ts → worker.d.DyXSTmRq.d.ts} +1 -1
- package/dist/chunks/{worker.d.DoNjFAiv.d.ts → worker.d.xTcinSQw.d.ts} +9 -15
- package/dist/cli.js +4 -4
- package/dist/config.d.ts +44 -44
- package/dist/config.js +1 -1
- package/dist/coverage.d.ts +20 -18
- package/dist/coverage.js +3 -3
- package/dist/environments.d.ts +9 -9
- package/dist/execute.d.ts +7 -7
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +29 -27
- package/dist/index.js +2 -2
- package/dist/node.d.ts +23 -24
- package/dist/node.js +9 -9
- package/dist/reporters.d.ts +7 -7
- package/dist/reporters.js +3 -3
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +10 -3
- package/dist/suite.d.ts +2 -2
- package/dist/worker.js +1 -1
- package/dist/workers/forks.js +3 -3
- package/dist/workers/runVmTests.js +4 -4
- package/dist/workers/threads.js +3 -3
- package/dist/workers/vmForks.js +4 -4
- package/dist/workers/vmThreads.js +4 -4
- package/dist/workers.d.ts +4 -4
- package/dist/workers.js +5 -5
- package/globals.d.ts +17 -17
- package/package.json +17 -17
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { S as SerializedTestSpecification } from './chunks/browser.d.
|
|
2
|
-
export { B as BrowserTesterOptions } from './chunks/browser.d.
|
|
3
|
-
import './chunks/global.d.
|
|
1
|
+
import { S as SerializedTestSpecification } from './chunks/browser.d.BSPEQIuf.js';
|
|
2
|
+
export { B as BrowserTesterOptions } from './chunks/browser.d.BSPEQIuf.js';
|
|
3
|
+
import './chunks/global.d.DAhT2emn.js';
|
|
4
4
|
import { File, TestAnnotation, TaskResultPack, TaskEventPack, TaskPopulated } from '@vitest/runner';
|
|
5
|
-
export { CancelReason,
|
|
6
|
-
import { a as BirpcReturn } from './chunks/worker.d.
|
|
7
|
-
export { C as ContextRPC, c as ContextTestEnvironment, b as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.
|
|
8
|
-
import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.
|
|
9
|
-
export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.
|
|
10
|
-
import { b as Awaitable, U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, P as ProvidedContext } from './chunks/environment.d.
|
|
11
|
-
export { A as AfterSuiteRunMeta } from './chunks/environment.d.
|
|
5
|
+
export { CancelReason, HookCleanupCallback, HookListener, ImportDuration, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskEventPack as RunnerTaskEventPack, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestAnnotation, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
6
|
+
import { a as BirpcReturn } from './chunks/worker.d.xTcinSQw.js';
|
|
7
|
+
export { C as ContextRPC, c as ContextTestEnvironment, b as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.xTcinSQw.js';
|
|
8
|
+
import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.DZo8c7fw.js';
|
|
9
|
+
export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.DZo8c7fw.js';
|
|
10
|
+
import { b as Awaitable, U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, P as ProvidedContext } from './chunks/environment.d.Bhm9oc0v.js';
|
|
11
|
+
export { A as AfterSuiteRunMeta } from './chunks/environment.d.Bhm9oc0v.js';
|
|
12
12
|
import { ExpectStatic } from '@vitest/expect';
|
|
13
13
|
export { Assertion, AsymmetricMatchersContaining, DeeplyAllowMatchers, ExpectPollOptions, ExpectStatic, JestAssertion, Matchers } from '@vitest/expect';
|
|
14
14
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
|
15
15
|
export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject } from '@vitest/spy';
|
|
16
16
|
import { M as MockFactoryWithHelper, a as MockOptions } from './chunks/mocker.d.BE_2ls6u.js';
|
|
17
|
-
export { b as bench } from './chunks/suite.d.
|
|
18
|
-
export { a as BenchFunction, b as Benchmark, c as BenchmarkAPI, B as BenchmarkResult } from './chunks/benchmark.d.
|
|
17
|
+
export { b as bench } from './chunks/suite.d.BJWk38HB.js';
|
|
18
|
+
export { a as BenchFunction, b as Benchmark, c as BenchmarkAPI, B as BenchmarkResult } from './chunks/benchmark.d.DAaHLpsq.js';
|
|
19
19
|
export { ExpectTypeOf, expectTypeOf } from 'expect-type';
|
|
20
20
|
export { SnapshotData, SnapshotMatchOptions, SnapshotResult, SnapshotSerializer, SnapshotStateOptions, SnapshotSummary, SnapshotUpdateState, UncheckedSnapshot } from '@vitest/snapshot';
|
|
21
21
|
export { ParsedStack, SerializedError, TestError } from '@vitest/utils';
|
|
@@ -41,7 +41,7 @@ interface SourceMap {
|
|
|
41
41
|
interface TransformResultWithSource {
|
|
42
42
|
code: string;
|
|
43
43
|
map: SourceMap | {
|
|
44
|
-
mappings: ""
|
|
44
|
+
mappings: "";
|
|
45
45
|
} | null;
|
|
46
46
|
etag?: string;
|
|
47
47
|
deps?: string[];
|
|
@@ -54,12 +54,9 @@ interface WebSocketHandlers {
|
|
|
54
54
|
getTestFiles: () => Promise<SerializedTestSpecification[]>;
|
|
55
55
|
getPaths: () => string[];
|
|
56
56
|
getConfig: () => SerializedConfig;
|
|
57
|
-
// TODO: Remove in v4
|
|
58
|
-
/** @deprecated -- Use `getResolvedProjectLabels` instead */
|
|
59
|
-
getResolvedProjectNames: () => string[];
|
|
60
57
|
getResolvedProjectLabels: () => {
|
|
61
|
-
name: string
|
|
62
|
-
color?: LabelColor
|
|
58
|
+
name: string;
|
|
59
|
+
color?: LabelColor;
|
|
63
60
|
}[];
|
|
64
61
|
getModuleGraph: (projectName: string, id: string, browser?: boolean) => Promise<ModuleGraphData>;
|
|
65
62
|
getTransformResult: (projectName: string, id: string, browser?: boolean) => Promise<TransformResultWithSource | undefined>;
|
|
@@ -373,12 +370,17 @@ interface VitestUtils {
|
|
|
373
370
|
*
|
|
374
371
|
* expect(mocked.simple()).toBe('mocked')
|
|
375
372
|
* expect(mocked.nested.method()).toBe('mocked nested')
|
|
373
|
+
*
|
|
374
|
+
* const spied = vi.mockObject(original, { spy: true })
|
|
375
|
+
* expect(spied.simple()).toBe('value')
|
|
376
|
+
* expect(spied.simple).toHaveBeenCalled()
|
|
377
|
+
* expect(spied.simple.mock.results[0]).toEqual({ type: 'return', value: 'value' })
|
|
376
378
|
* ```
|
|
377
379
|
*
|
|
378
380
|
* @param value - The object to be mocked
|
|
379
381
|
* @returns A deeply mocked version of the input object
|
|
380
382
|
*/
|
|
381
|
-
mockObject: <T>(value: T) => MaybeMockedDeep<T>;
|
|
383
|
+
mockObject: <T>(value: T, options?: MockOptions) => MaybeMockedDeep<T>;
|
|
382
384
|
/**
|
|
383
385
|
* Type helper for TypeScript. Just returns the object that was passed.
|
|
384
386
|
*
|
|
@@ -399,17 +401,17 @@ interface VitestUtils {
|
|
|
399
401
|
* @param options If the object is partially or deeply mocked
|
|
400
402
|
*/
|
|
401
403
|
mocked: (<T>(item: T, deep?: false) => MaybeMocked<T>) & (<T>(item: T, deep: true) => MaybeMockedDeep<T>) & (<T>(item: T, options: {
|
|
402
|
-
partial?: false
|
|
403
|
-
deep?: false
|
|
404
|
+
partial?: false;
|
|
405
|
+
deep?: false;
|
|
404
406
|
}) => MaybeMocked<T>) & (<T>(item: T, options: {
|
|
405
|
-
partial?: false
|
|
406
|
-
deep: true
|
|
407
|
+
partial?: false;
|
|
408
|
+
deep: true;
|
|
407
409
|
}) => MaybeMockedDeep<T>) & (<T>(item: T, options: {
|
|
408
|
-
partial: true
|
|
409
|
-
deep?: false
|
|
410
|
+
partial: true;
|
|
411
|
+
deep?: false;
|
|
410
412
|
}) => MaybePartiallyMocked<T>) & (<T>(item: T, options: {
|
|
411
|
-
partial: true
|
|
412
|
-
deep: true
|
|
413
|
+
partial: true;
|
|
414
|
+
deep: true;
|
|
413
415
|
}) => MaybePartiallyMockedDeep<T>) & (<T>(item: T) => MaybeMocked<T>);
|
|
414
416
|
/**
|
|
415
417
|
* Checks that a given parameter is a mock function. If you are using TypeScript, it will also narrow down its type.
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as createExpect, a as expect, i as inject, v as vi, b as vitest } from './chunks/vi.
|
|
1
|
+
export { c as createExpect, a as expect, i as inject, v as vi, b as vitest } from './chunks/vi.CA0EPI9Y.js';
|
|
2
2
|
export { b as bench } from './chunks/benchmark.CYdenmiT.js';
|
|
3
|
-
export { a as assertType } from './chunks/index.
|
|
3
|
+
export { a as assertType } from './chunks/index.D1_MsKEt.js';
|
|
4
4
|
export { expectTypeOf } from 'expect-type';
|
|
5
5
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
6
6
|
import * as chai from 'chai';
|
package/dist/node.d.ts
CHANGED
|
@@ -3,22 +3,22 @@ import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as Res
|
|
|
3
3
|
export { vite as Vite };
|
|
4
4
|
export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
5
5
|
import { IncomingMessage } from 'node:http';
|
|
6
|
-
import { h as ResolvedConfig, f as UserConfig, i as VitestRunMode, j as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, k as TestSequencer, l as TestSpecification, L as Logger } from './chunks/reporters.d.
|
|
7
|
-
export { ao as BaseCoverageOptions, K as BenchmarkUserOptions, N as BrowserBuiltinProvider, Q as BrowserCommand, X as BrowserCommandContext, Y as BrowserConfigOptions, Z as BrowserInstanceOption, _ as BrowserModuleMocker, $ as BrowserOrchestrator, a0 as BrowserProvider, a1 as BrowserProviderInitializationOptions, a2 as BrowserProviderModule, a3 as BrowserProviderOptions, a4 as BrowserScript, a5 as BrowserServerState, a6 as BrowserServerStateSession, ab as BuiltinEnvironment, a7 as CDPSession, ac as CSSModuleScopeStrategy, ap as CoverageIstanbulOptions, aq as CoverageOptions, ar as CoverageProvider, as as CoverageProviderModule, at as CoverageReporter, c as CoverageV8Options, au as CustomProviderOptions, ad as DepsOptimizationOptions, ae as EnvironmentOptions, H as HTMLOptions, I as InlineConfig, q as JUnitOptions, J as JsonOptions, M as ModuleDiagnostic, O as OnServerRestartHandler, m as OnTestsRerunHandler, a8 as ParentProjectBrowser, af as Pool, ag as PoolOptions, P as ProcessPool, a9 as ProjectBrowser, ah as ProjectConfig, b as ReportContext, aw as ReportedHookContext, ax as Reporter, aj as ResolveSnapshotPathHandler, ak as ResolveSnapshotPathHandlerContext, aa as ResolvedBrowserOptions, R as ResolvedCoverageOptions, ai as ResolvedProjectConfig, S as SerializedTestProject, r as TaskOptions, s as TestCase, t as TestCollection, u as TestDiagnostic, v as TestModule, w as TestModuleState, x as TestResult, y as TestResultFailed, z as TestResultPassed, B as TestResultSkipped, ay as TestRunEndReason, av as TestRunResult, G as TestSequencerConstructor, D as TestState, E as TestSuite, F as TestSuiteState, al as TransformModePatterns, am as TypecheckConfig, U as UserWorkspaceConfig, an as VitestEnvironment, n as VitestPackageInstaller, W as WatcherTriggerPattern, o as WorkspaceSpec, p as getFilePoolName } from './chunks/reporters.d.
|
|
8
|
-
import { R as RuntimeRPC } from './chunks/worker.d.
|
|
9
|
-
export { T as TestExecutionType } from './chunks/worker.d.
|
|
6
|
+
import { h as ResolvedConfig, f as UserConfig, i as VitestRunMode, j as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, k as TestSequencer, l as TestSpecification, L as Logger } from './chunks/reporters.d.BBuiUFDc.js';
|
|
7
|
+
export { ao as BaseCoverageOptions, K as BenchmarkUserOptions, N as BrowserBuiltinProvider, Q as BrowserCommand, X as BrowserCommandContext, Y as BrowserConfigOptions, Z as BrowserInstanceOption, _ as BrowserModuleMocker, $ as BrowserOrchestrator, a0 as BrowserProvider, a1 as BrowserProviderInitializationOptions, a2 as BrowserProviderModule, a3 as BrowserProviderOptions, a4 as BrowserScript, a5 as BrowserServerState, a6 as BrowserServerStateSession, ab as BuiltinEnvironment, a7 as CDPSession, ac as CSSModuleScopeStrategy, ap as CoverageIstanbulOptions, aq as CoverageOptions, ar as CoverageProvider, as as CoverageProviderModule, at as CoverageReporter, c as CoverageV8Options, au as CustomProviderOptions, ad as DepsOptimizationOptions, ae as EnvironmentOptions, H as HTMLOptions, I as InlineConfig, q as JUnitOptions, J as JsonOptions, M as ModuleDiagnostic, O as OnServerRestartHandler, m as OnTestsRerunHandler, a8 as ParentProjectBrowser, af as Pool, ag as PoolOptions, P as ProcessPool, a9 as ProjectBrowser, ah as ProjectConfig, b as ReportContext, aw as ReportedHookContext, ax as Reporter, aj as ResolveSnapshotPathHandler, ak as ResolveSnapshotPathHandlerContext, aa as ResolvedBrowserOptions, R as ResolvedCoverageOptions, ai as ResolvedProjectConfig, S as SerializedTestProject, r as TaskOptions, s as TestCase, t as TestCollection, u as TestDiagnostic, v as TestModule, w as TestModuleState, x as TestResult, y as TestResultFailed, z as TestResultPassed, B as TestResultSkipped, ay as TestRunEndReason, av as TestRunResult, G as TestSequencerConstructor, D as TestState, E as TestSuite, F as TestSuiteState, al as TransformModePatterns, am as TypecheckConfig, U as UserWorkspaceConfig, an as VitestEnvironment, n as VitestPackageInstaller, W as WatcherTriggerPattern, o as WorkspaceSpec, p as getFilePoolName } from './chunks/reporters.d.BBuiUFDc.js';
|
|
8
|
+
import { R as RuntimeRPC } from './chunks/worker.d.xTcinSQw.js';
|
|
9
|
+
export { T as TestExecutionType } from './chunks/worker.d.xTcinSQw.js';
|
|
10
10
|
import { Writable } from 'node:stream';
|
|
11
|
-
export { V as VitestPluginContext } from './chunks/plugin.d.
|
|
12
|
-
export { W as WorkerContext } from './chunks/worker.d.
|
|
11
|
+
export { V as VitestPluginContext } from './chunks/plugin.d.CKCmge5g.js';
|
|
12
|
+
export { W as WorkerContext } from './chunks/worker.d.DyXSTmRq.js';
|
|
13
13
|
import { Debugger } from 'debug';
|
|
14
|
-
import './chunks/global.d.
|
|
14
|
+
import './chunks/global.d.DAhT2emn.js';
|
|
15
15
|
export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
16
|
-
export { b as RuntimeConfig } from './chunks/config.d.
|
|
16
|
+
export { b as RuntimeConfig } from './chunks/config.d.DZo8c7fw.js';
|
|
17
17
|
export { SerializedError } from '@vitest/utils';
|
|
18
18
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
19
|
-
import './chunks/environment.d.
|
|
19
|
+
import './chunks/environment.d.Bhm9oc0v.js';
|
|
20
20
|
import 'node:console';
|
|
21
|
-
import './chunks/browser.d.
|
|
21
|
+
import './chunks/browser.d.BSPEQIuf.js';
|
|
22
22
|
import '@vitest/mocker';
|
|
23
23
|
import '@vitest/utils/source-map';
|
|
24
24
|
import '@vitest/pretty-format';
|
|
@@ -27,9 +27,9 @@ import '@vitest/utils/diff';
|
|
|
27
27
|
import 'vite-node';
|
|
28
28
|
import 'chai';
|
|
29
29
|
import 'vitest/optional-types.js';
|
|
30
|
-
import './chunks/benchmark.d.
|
|
30
|
+
import './chunks/benchmark.d.DAaHLpsq.js';
|
|
31
31
|
import 'tinybench';
|
|
32
|
-
import './chunks/coverage.d.
|
|
32
|
+
import './chunks/coverage.d.CNYjU4GF.js';
|
|
33
33
|
import 'vite-node/client';
|
|
34
34
|
import '@vitest/snapshot/manager';
|
|
35
35
|
import 'node:fs';
|
|
@@ -55,9 +55,9 @@ interface RootAndTarget {
|
|
|
55
55
|
targetAbsPath: string;
|
|
56
56
|
}
|
|
57
57
|
type Context = RootAndTarget & {
|
|
58
|
-
rawErrsMap: RawErrsMap
|
|
59
|
-
openedDirs: Set<string
|
|
60
|
-
lastActivePath?: string
|
|
58
|
+
rawErrsMap: RawErrsMap;
|
|
59
|
+
openedDirs: Set<string>;
|
|
60
|
+
lastActivePath?: string;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
declare function isValidApiRequest(config: ResolvedConfig, req: IncomingMessage): boolean;
|
|
@@ -86,7 +86,7 @@ interface CliOptions extends UserConfig {
|
|
|
86
86
|
* @experimental
|
|
87
87
|
*/
|
|
88
88
|
configLoader?: InlineConfig extends {
|
|
89
|
-
configLoader?: infer T
|
|
89
|
+
configLoader?: infer T;
|
|
90
90
|
} ? T : never;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
@@ -100,8 +100,8 @@ interface CliParseOptions {
|
|
|
100
100
|
allowUnknownOptions?: boolean;
|
|
101
101
|
}
|
|
102
102
|
declare function parseCLI(argv: string | string[], config?: CliParseOptions): {
|
|
103
|
-
filter: string[]
|
|
104
|
-
options: CliOptions
|
|
103
|
+
filter: string[];
|
|
104
|
+
options: CliOptions;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(options: Options, defaultPort: number): ApiConfig | undefined;
|
|
@@ -117,15 +117,12 @@ declare class GitNotFoundError extends Error {
|
|
|
117
117
|
constructor();
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
/** @deprecated use `TestProject` instead */
|
|
121
|
-
type GlobalSetupContext = TestProject;
|
|
122
|
-
|
|
123
120
|
declare function VitestPlugin(options?: UserConfig, vitest?: Vitest): Promise<Plugin[]>;
|
|
124
121
|
|
|
125
122
|
// this is only exported as a public function and not used inside vitest
|
|
126
123
|
declare function resolveConfig(options?: UserConfig, viteOverrides?: UserConfig$1): Promise<{
|
|
127
|
-
vitestConfig: ResolvedConfig
|
|
128
|
-
viteConfig: ResolvedConfig$1
|
|
124
|
+
vitestConfig: ResolvedConfig;
|
|
125
|
+
viteConfig: ResolvedConfig$1;
|
|
129
126
|
}>;
|
|
130
127
|
|
|
131
128
|
declare function resolveFsAllow(projectRoot: string, rootConfigFile: string | false | undefined): string[];
|
|
@@ -144,6 +141,8 @@ declare class BaseSequencer implements TestSequencer {
|
|
|
144
141
|
shard(files: TestSpecification[]): Promise<TestSpecification[]>;
|
|
145
142
|
// async so it can be extended by other sequelizers
|
|
146
143
|
sort(files: TestSpecification[]): Promise<TestSpecification[]>;
|
|
144
|
+
// Calculate distributed shard range [start, end] distributed equally
|
|
145
|
+
private calculateShardRange;
|
|
147
146
|
}
|
|
148
147
|
|
|
149
148
|
declare function registerConsoleShortcuts(ctx: Vitest, stdin: NodeJS.ReadStream | undefined, stdout: NodeJS.WriteStream | Writable): () => void;
|
|
@@ -167,4 +166,4 @@ declare const createViteServer: typeof vite.createServer;
|
|
|
167
166
|
declare const rolldownVersion: string | undefined;
|
|
168
167
|
|
|
169
168
|
export { ApiConfig, BaseSequencer, GitNotFoundError, ResolvedConfig, TestProject, TestSequencer, TestSpecification, UserConfig as TestUserConfig, FilesNotFoundError as TestsNotFoundError, Vitest, VitestOptions, VitestPlugin, VitestRunMode, TestProject as WorkspaceProject, createDebugger, createMethodsRPC, createViteLogger, createViteServer, createVitest, distDir, isValidApiRequest, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rolldownVersion, rootDir, startVitest, version };
|
|
170
|
-
export type { CliParseOptions,
|
|
169
|
+
export type { CliParseOptions, CollectLineNumbers as TypeCheckCollectLineNumbers, CollectLines as TypeCheckCollectLines, Context as TypeCheckContext, TscErrorInfo as TypeCheckErrorInfo, RawErrsMap as TypeCheckRawErrorsMap, RootAndTarget as TypeCheckRootAndTarget };
|
package/dist/node.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import { resolveConfig as resolveConfig$1, mergeConfig } from 'vite';
|
|
3
3
|
export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
4
|
-
import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.
|
|
5
|
-
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.
|
|
6
|
-
export { p as parseCLI } from './chunks/cac.
|
|
7
|
-
import { r as resolveConfig$2 } from './chunks/coverage.
|
|
8
|
-
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.
|
|
4
|
+
import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.DE98RCgs.js';
|
|
5
|
+
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.DE98RCgs.js';
|
|
6
|
+
export { p as parseCLI } from './chunks/cac.C30xmylc.js';
|
|
7
|
+
import { r as resolveConfig$2 } from './chunks/coverage.OOpN1tMC.js';
|
|
8
|
+
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.OOpN1tMC.js';
|
|
9
9
|
import { slash, deepClone } from '@vitest/utils';
|
|
10
10
|
import { f as findUp } from './chunks/index.X0nbfr6-.js';
|
|
11
11
|
import { resolve } from 'pathe';
|
|
12
|
-
import { c as configFiles } from './chunks/constants.
|
|
12
|
+
import { c as configFiles } from './chunks/constants.CXzqaLmq.js';
|
|
13
13
|
export { distDir, rootDir } from './path.js';
|
|
14
14
|
import createDebug from 'debug';
|
|
15
15
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
@@ -20,9 +20,9 @@ import '@vitest/snapshot/manager';
|
|
|
20
20
|
import 'vite-node/client';
|
|
21
21
|
import 'vite-node/server';
|
|
22
22
|
import './chunks/index.B521nVV-.js';
|
|
23
|
-
import './chunks/index.
|
|
23
|
+
import './chunks/index.Bz6b0Ib7.js';
|
|
24
24
|
import 'node:fs/promises';
|
|
25
|
-
import './chunks/typechecker.
|
|
25
|
+
import './chunks/typechecker.CMNPqJOo.js';
|
|
26
26
|
import 'node:os';
|
|
27
27
|
import 'node:perf_hooks';
|
|
28
28
|
import '@vitest/utils/source-map';
|
|
@@ -53,7 +53,7 @@ import 'vite-node/utils';
|
|
|
53
53
|
import '@vitest/mocker/node';
|
|
54
54
|
import './chunks/defaults.CXFFjsi8.js';
|
|
55
55
|
import 'magic-string';
|
|
56
|
-
import './chunks/index.
|
|
56
|
+
import './chunks/index.D3SKT3tv.js';
|
|
57
57
|
import 'node:assert';
|
|
58
58
|
import '@vitest/utils/error';
|
|
59
59
|
import 'node:readline';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { aM as BaseReporter, 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, ax as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ay as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.d.
|
|
1
|
+
export { aM as BaseReporter, 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, ax as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ay as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.d.BBuiUFDc.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
|
-
import './chunks/environment.d.
|
|
3
|
+
import './chunks/environment.d.Bhm9oc0v.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:stream';
|
|
6
6
|
import 'vite';
|
|
7
7
|
import 'node:console';
|
|
8
|
-
import './chunks/browser.d.
|
|
9
|
-
import './chunks/worker.d.
|
|
10
|
-
import './chunks/config.d.
|
|
8
|
+
import './chunks/browser.d.BSPEQIuf.js';
|
|
9
|
+
import './chunks/worker.d.xTcinSQw.js';
|
|
10
|
+
import './chunks/config.d.DZo8c7fw.js';
|
|
11
11
|
import '@vitest/pretty-format';
|
|
12
12
|
import '@vitest/snapshot';
|
|
13
13
|
import '@vitest/utils/diff';
|
|
@@ -16,10 +16,10 @@ import '@vitest/utils/source-map';
|
|
|
16
16
|
import 'vite-node';
|
|
17
17
|
import 'chai';
|
|
18
18
|
import 'vitest/optional-types.js';
|
|
19
|
-
import './chunks/benchmark.d.
|
|
19
|
+
import './chunks/benchmark.d.DAaHLpsq.js';
|
|
20
20
|
import '@vitest/runner/utils';
|
|
21
21
|
import 'tinybench';
|
|
22
|
-
import './chunks/coverage.d.
|
|
22
|
+
import './chunks/coverage.d.CNYjU4GF.js';
|
|
23
23
|
import 'vite-node/client';
|
|
24
24
|
import '@vitest/snapshot/manager';
|
|
25
25
|
import 'node:fs';
|
package/dist/reporters.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, V as VerboseReporter } from './chunks/index.
|
|
2
|
-
export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.
|
|
1
|
+
export { D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, V as VerboseReporter } from './chunks/index.Bz6b0Ib7.js';
|
|
2
|
+
export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.D3SKT3tv.js';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:fs/promises';
|
|
5
5
|
import 'pathe';
|
|
6
|
-
import './chunks/typechecker.
|
|
6
|
+
import './chunks/typechecker.CMNPqJOo.js';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'node:perf_hooks';
|
|
9
9
|
import '@vitest/utils/source-map';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as tinybench from 'tinybench';
|
|
2
2
|
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test, TestContext, ImportDuration } from '@vitest/runner';
|
|
3
3
|
export { VitestRunner } from '@vitest/runner';
|
|
4
|
-
import { a as SerializedConfig } from './chunks/config.d.
|
|
4
|
+
import { a as SerializedConfig } from './chunks/config.d.DZo8c7fw.js';
|
|
5
5
|
import '@vitest/pretty-format';
|
|
6
6
|
import '@vitest/snapshot';
|
|
7
7
|
import '@vitest/utils/diff';
|
package/dist/runners.js
CHANGED
|
@@ -4,13 +4,13 @@ import { a as getBenchOptions, g as getBenchFn } from './chunks/benchmark.CYdenm
|
|
|
4
4
|
import { g as getWorkerState } from './chunks/utils.XdZDrNZV.js';
|
|
5
5
|
import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
|
|
6
6
|
import { getTests, getNames, getTestName } from '@vitest/runner/utils';
|
|
7
|
+
import { processError } from '@vitest/utils/error';
|
|
7
8
|
import { normalize } from 'pathe';
|
|
8
|
-
import { g as getSnapshotClient, i as inject, c as createExpect, v as vi } from './chunks/vi.
|
|
9
|
+
import { g as getSnapshotClient, i as inject, c as createExpect, v as vi } from './chunks/vi.CA0EPI9Y.js';
|
|
9
10
|
import { r as rpc } from './chunks/rpc.CsFtxqeq.js';
|
|
10
11
|
import 'chai';
|
|
11
12
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
12
13
|
import '@vitest/snapshot';
|
|
13
|
-
import '@vitest/utils/error';
|
|
14
14
|
import '@vitest/spy';
|
|
15
15
|
import '@vitest/utils/source-map';
|
|
16
16
|
import './chunks/date.Bq6ZW5rf.js';
|
|
@@ -156,6 +156,13 @@ class VitestTestRunner {
|
|
|
156
156
|
this.snapshotClient.skipTest(suite.file.filepath, name);
|
|
157
157
|
}
|
|
158
158
|
const result = await this.snapshotClient.finish(suite.file.filepath);
|
|
159
|
+
if (this.workerState.config.snapshotOptions.updateSnapshot === "none" && result.unchecked) {
|
|
160
|
+
let message = `Obsolete snapshots found when no snapshot update is expected.\n`;
|
|
161
|
+
for (const key of result.uncheckedKeys) message += `· ${key}\n`;
|
|
162
|
+
suite.result.errors ??= [];
|
|
163
|
+
suite.result.errors.push(processError(new Error(message)));
|
|
164
|
+
suite.result.state = "fail";
|
|
165
|
+
}
|
|
159
166
|
await rpc().snapshotSaved(result);
|
|
160
167
|
}
|
|
161
168
|
this.workerState.current = suite.suite || suite.file;
|
|
@@ -204,7 +211,7 @@ class VitestTestRunner {
|
|
|
204
211
|
}
|
|
205
212
|
extendTaskContext(context) {
|
|
206
213
|
// create error during the test initialization so we have a nice stack trace
|
|
207
|
-
if (this.config.expect.requireAssertions) this.assertionsErrors.set(context.task, new Error("expected any number of assertion, but got none"));
|
|
214
|
+
if (this.config.expect.requireAssertions) this.assertionsErrors.set(context.task, /* @__PURE__ */ new Error("expected any number of assertion, but got none"));
|
|
208
215
|
let _expect;
|
|
209
216
|
Object.defineProperty(context, "expect", { get() {
|
|
210
217
|
if (!_expect) _expect = createExpect(context.task);
|
package/dist/suite.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { g as getBenchFn, a as getBenchOptions } from './chunks/suite.d.
|
|
1
|
+
export { g as getBenchFn, a as getBenchOptions } from './chunks/suite.d.BJWk38HB.js';
|
|
2
2
|
export { VitestRunner, VitestRunnerConfig, createTaskCollector, getCurrentSuite, getCurrentTest, getFn, getHooks, setFn, setHooks } from '@vitest/runner';
|
|
3
3
|
export { createChainable } from '@vitest/runner/utils';
|
|
4
|
-
import './chunks/benchmark.d.
|
|
4
|
+
import './chunks/benchmark.d.DAaHLpsq.js';
|
|
5
5
|
import 'tinybench';
|
package/dist/worker.js
CHANGED
|
@@ -8,7 +8,7 @@ import { e as environments } from './chunks/index.CmSc2RE5.js';
|
|
|
8
8
|
import { s as setupInspect } from './chunks/inspector.C914Efll.js';
|
|
9
9
|
import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.CsFtxqeq.js';
|
|
10
10
|
import { i as isChildProcess, s as setProcessTitle } from './chunks/utils.XdZDrNZV.js';
|
|
11
|
-
import { d as disposeInternalListeners } from './chunks/utils.
|
|
11
|
+
import { d as disposeInternalListeners } from './chunks/utils.CcGm2cd1.js';
|
|
12
12
|
import 'node:console';
|
|
13
13
|
import 'node:module';
|
|
14
14
|
import '@vitest/utils';
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
3
|
-
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.
|
|
2
|
+
import { r as runBaseTests } from '../chunks/base.D5_IXzht.js';
|
|
3
|
+
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.CcGm2cd1.js';
|
|
4
4
|
import 'vite-node/client';
|
|
5
|
-
import '../chunks/execute.
|
|
5
|
+
import '../chunks/execute.Dt-pCVcL.js';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:vm';
|
|
@@ -6,9 +6,9 @@ import util from 'node:util';
|
|
|
6
6
|
import { startTests, collectTests } from '@vitest/runner';
|
|
7
7
|
import { KNOWN_ASSET_TYPES } from 'vite-node/constants';
|
|
8
8
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
9
|
-
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.
|
|
10
|
-
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.
|
|
11
|
-
import { V as VitestIndex } from '../chunks/index.
|
|
9
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.Dppt57hu.js';
|
|
10
|
+
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.Ebx5x0eP.js';
|
|
11
|
+
import { V as VitestIndex } from '../chunks/index.D1_MsKEt.js';
|
|
12
12
|
import { c as closeInspector } from '../chunks/inspector.C914Efll.js';
|
|
13
13
|
import { g as getWorkerState } from '../chunks/utils.XdZDrNZV.js';
|
|
14
14
|
import 'chai';
|
|
@@ -20,7 +20,7 @@ import '@vitest/utils';
|
|
|
20
20
|
import '../chunks/index.B521nVV-.js';
|
|
21
21
|
import '../chunks/coverage.DVF1vEu8.js';
|
|
22
22
|
import '@vitest/snapshot';
|
|
23
|
-
import '../chunks/vi.
|
|
23
|
+
import '../chunks/vi.CA0EPI9Y.js';
|
|
24
24
|
import '@vitest/expect';
|
|
25
25
|
import '@vitest/runner/utils';
|
|
26
26
|
import '../chunks/_commonjsHelpers.BFTU3MAI.js';
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
2
|
-
import { a as createThreadsRpcOptions } from '../chunks/utils.
|
|
1
|
+
import { r as runBaseTests } from '../chunks/base.D5_IXzht.js';
|
|
2
|
+
import { a as createThreadsRpcOptions } from '../chunks/utils.CcGm2cd1.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
|
-
import '../chunks/execute.
|
|
4
|
+
import '../chunks/execute.Dt-pCVcL.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'node:vm';
|
package/dist/workers/vmForks.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.
|
|
3
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
2
|
+
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.CcGm2cd1.js';
|
|
3
|
+
import { r as runVmTests } from '../chunks/vm.BUnLJt_P.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'node:vm';
|
|
7
7
|
import 'pathe';
|
|
8
8
|
import '../path.js';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import '../chunks/console.
|
|
10
|
+
import '../chunks/console.DoJHFxmj.js';
|
|
11
11
|
import 'node:console';
|
|
12
12
|
import 'node:stream';
|
|
13
13
|
import 'tinyrainbow';
|
|
14
14
|
import '../chunks/date.Bq6ZW5rf.js';
|
|
15
15
|
import '../chunks/utils.XdZDrNZV.js';
|
|
16
|
-
import '../chunks/execute.
|
|
16
|
+
import '../chunks/execute.Dt-pCVcL.js';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import '@vitest/utils/error';
|
|
19
19
|
import 'vite-node/client';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { a as createThreadsRpcOptions } from '../chunks/utils.
|
|
2
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
1
|
+
import { a as createThreadsRpcOptions } from '../chunks/utils.CcGm2cd1.js';
|
|
2
|
+
import { r as runVmTests } from '../chunks/vm.BUnLJt_P.js';
|
|
3
3
|
import '@vitest/utils';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'node:vm';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import '../path.js';
|
|
8
8
|
import 'node:path';
|
|
9
|
-
import '../chunks/console.
|
|
9
|
+
import '../chunks/console.DoJHFxmj.js';
|
|
10
10
|
import 'node:console';
|
|
11
11
|
import 'node:stream';
|
|
12
12
|
import 'tinyrainbow';
|
|
13
13
|
import '../chunks/date.Bq6ZW5rf.js';
|
|
14
14
|
import '../chunks/utils.XdZDrNZV.js';
|
|
15
|
-
import '../chunks/execute.
|
|
15
|
+
import '../chunks/execute.Dt-pCVcL.js';
|
|
16
16
|
import 'node:fs';
|
|
17
17
|
import '@vitest/utils/error';
|
|
18
18
|
import 'vite-node/client';
|
package/dist/workers.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.
|
|
1
|
+
import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.xTcinSQw.js';
|
|
2
2
|
import { Awaitable } from '@vitest/utils';
|
|
3
3
|
import * as v8 from 'v8';
|
|
4
|
-
import { a as SerializedConfig } from './chunks/config.d.
|
|
5
|
-
import { W as WorkerContext } from './chunks/worker.d.
|
|
4
|
+
import { a as SerializedConfig } from './chunks/config.d.DZo8c7fw.js';
|
|
5
|
+
import { W as WorkerContext } from './chunks/worker.d.DyXSTmRq.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
|
-
import './chunks/environment.d.
|
|
7
|
+
import './chunks/environment.d.Bhm9oc0v.js';
|
|
8
8
|
import '@vitest/snapshot';
|
|
9
9
|
import '@vitest/pretty-format';
|
|
10
10
|
import '@vitest/utils/diff';
|
package/dist/workers.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { p as provideWorkerState } from './chunks/utils.XdZDrNZV.js';
|
|
2
2
|
export { collect as collectVitestWorkerTests, run as runVitestWorker } from './worker.js';
|
|
3
|
-
export { r as runBaseTests } from './chunks/base.
|
|
4
|
-
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.
|
|
5
|
-
export { r as runVmTests } from './chunks/vm.
|
|
3
|
+
export { r as runBaseTests } from './chunks/base.D5_IXzht.js';
|
|
4
|
+
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.CcGm2cd1.js';
|
|
5
|
+
export { r as runVmTests } from './chunks/vm.BUnLJt_P.js';
|
|
6
6
|
import '@vitest/utils';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import '@vitest/utils/source-map';
|
|
@@ -16,14 +16,14 @@ import './chunks/inspector.C914Efll.js';
|
|
|
16
16
|
import 'node:module';
|
|
17
17
|
import './chunks/rpc.CsFtxqeq.js';
|
|
18
18
|
import './chunks/index.B521nVV-.js';
|
|
19
|
-
import './chunks/execute.
|
|
19
|
+
import './chunks/execute.Dt-pCVcL.js';
|
|
20
20
|
import 'node:vm';
|
|
21
21
|
import '@vitest/utils/error';
|
|
22
22
|
import 'vite-node/utils';
|
|
23
23
|
import './path.js';
|
|
24
24
|
import 'node:path';
|
|
25
25
|
import '@vitest/mocker';
|
|
26
|
-
import './chunks/console.
|
|
26
|
+
import './chunks/console.DoJHFxmj.js';
|
|
27
27
|
import 'node:stream';
|
|
28
28
|
import 'tinyrainbow';
|
|
29
29
|
import './chunks/date.Bq6ZW5rf.js';
|
package/globals.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
declare global {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
let suite: typeof import('vitest')['suite']
|
|
3
|
+
let test: typeof import('vitest')['test']
|
|
4
|
+
let chai: typeof import("vitest")["chai"]
|
|
5
|
+
let describe: typeof import('vitest')['describe']
|
|
6
|
+
let it: typeof import('vitest')['it']
|
|
7
|
+
let expectTypeOf: typeof import('vitest')['expectTypeOf']
|
|
8
|
+
let assertType: typeof import('vitest')['assertType']
|
|
9
|
+
let expect: typeof import('vitest')['expect']
|
|
10
|
+
let assert: typeof import('vitest')['assert']
|
|
11
|
+
let vitest: typeof import('vitest')['vitest']
|
|
12
|
+
let vi: typeof import('vitest')['vitest']
|
|
13
|
+
let beforeAll: typeof import('vitest')['beforeAll']
|
|
14
|
+
let afterAll: typeof import('vitest')['afterAll']
|
|
15
|
+
let beforeEach: typeof import('vitest')['beforeEach']
|
|
16
|
+
let afterEach: typeof import('vitest')['afterEach']
|
|
17
|
+
let onTestFailed: typeof import('vitest')['onTestFailed']
|
|
18
|
+
let onTestFinished: typeof import('vitest')['onTestFinished']
|
|
19
19
|
}
|
|
20
20
|
export {}
|