vitest 2.0.0-beta.12 → 2.0.0-beta.13
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/LICENSE.md +0 -21
- package/dist/browser.d.ts +3 -2
- package/dist/browser.js +2 -2
- package/dist/chunks/{browser-creator.Bw94IHrL.js → browser-creator.DSqYDthP.js} +1 -1
- package/dist/chunks/{integrations-globals.DSNOaUHv.js → integrations-globals.CzYWb38r.js} +1 -1
- package/dist/chunks/{runtime-runBaseTests.BDt9gQFB.js → runtime-runBaseTests.DX3h28Mp.js} +9 -5
- package/dist/cli.js +2 -2
- package/dist/config.cjs +3 -2
- package/dist/config.d.ts +2 -1
- package/dist/config.js +3 -2
- package/dist/coverage.d.ts +2 -1
- package/dist/environments.d.ts +2 -1
- package/dist/execute.d.ts +4 -3
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/node.d.ts +18 -4
- package/dist/node.js +8 -8
- package/dist/{reporters-Cd1vkLMZ.d.ts → reporters-DrywOHjt.d.ts} +56 -19
- package/dist/reporters.d.ts +2 -1
- package/dist/reporters.js +2 -2
- package/dist/runners.d.ts +3 -1
- package/dist/runners.js +1 -0
- package/dist/{suite-BS2CV79a.d.ts → suite-CrOPuDIk.d.ts} +1 -1
- package/dist/suite.d.ts +3 -2
- package/dist/vendor/{base.Cy97mmVC.js → base.CdA1i5tB.js} +4 -3
- package/dist/vendor/{cac.DRNUX42m.js → cac.CpoEMnGk.js} +62 -15
- package/dist/vendor/{cli-api.Bu-PSdzx.js → cli-api.CXFLjKVN.js} +369 -97
- package/dist/vendor/{constants.BWsVtsAj.js → constants.CsnA4eRy.js} +1 -2
- package/dist/vendor/{execute.T3gg2ZK6.js → execute.Dx503nGn.js} +12 -4
- package/dist/vendor/{index.ZtQtNPP2.js → index.3x3MdmUV.js} +135 -78
- package/dist/vendor/{index.B7pSlOSa.js → index.CROIsoiT.js} +1 -1
- package/dist/vendor/{setup-common.CWnv_2-5.js → setup-common.yHaxjRhz.js} +1 -1
- package/dist/vendor/{utils.DSO2UK15.js → utils.BVMrsl6E.js} +15 -5
- package/dist/vendor/{vm.D9wVR14y.js → vm.BrDS6p7h.js} +6 -4
- package/dist/worker.js +11 -4
- package/dist/workers/forks.js +10 -4
- package/dist/workers/runVmTests.js +9 -5
- package/dist/workers/threads.js +6 -3
- package/dist/workers/vmForks.js +10 -4
- package/dist/workers/vmThreads.js +6 -3
- package/dist/workers.d.ts +7 -4
- package/dist/workers.js +4 -4
- package/package.json +12 -12
package/LICENSE.md
CHANGED
|
@@ -438,27 +438,6 @@ License: MIT
|
|
|
438
438
|
By: Mathias Bynens
|
|
439
439
|
Repository: https://github.com/mathiasbynens/emoji-regex.git
|
|
440
440
|
|
|
441
|
-
> Copyright Mathias Bynens <https://mathiasbynens.be/>
|
|
442
|
-
>
|
|
443
|
-
> Permission is hereby granted, free of charge, to any person obtaining
|
|
444
|
-
> a copy of this software and associated documentation files (the
|
|
445
|
-
> "Software"), to deal in the Software without restriction, including
|
|
446
|
-
> without limitation the rights to use, copy, modify, merge, publish,
|
|
447
|
-
> distribute, sublicense, and/or sell copies of the Software, and to
|
|
448
|
-
> permit persons to whom the Software is furnished to do so, subject to
|
|
449
|
-
> the following conditions:
|
|
450
|
-
>
|
|
451
|
-
> The above copyright notice and this permission notice shall be
|
|
452
|
-
> included in all copies or substantial portions of the Software.
|
|
453
|
-
>
|
|
454
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
455
|
-
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
456
|
-
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
457
|
-
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
458
|
-
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
459
|
-
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
460
|
-
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
461
|
-
|
|
462
441
|
---------------------------------------
|
|
463
442
|
|
|
464
443
|
## expect-type
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { processError, startTests } from '@vitest/runner';
|
|
2
|
-
import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-
|
|
1
|
+
export { collectTests, processError, startTests } from '@vitest/runner';
|
|
2
|
+
import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-DrywOHjt.js';
|
|
3
3
|
import { VitestExecutor } from './execute.js';
|
|
4
4
|
import * as spy$1 from '@vitest/spy';
|
|
5
5
|
import 'vite';
|
|
@@ -14,6 +14,7 @@ import 'vite-node/client';
|
|
|
14
14
|
import '@vitest/snapshot/manager';
|
|
15
15
|
import 'vite-node/server';
|
|
16
16
|
import 'node:worker_threads';
|
|
17
|
+
import '@vitest/utils/source-map';
|
|
17
18
|
import 'node:fs';
|
|
18
19
|
import 'chai';
|
|
19
20
|
import 'node:vm';
|
package/dist/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { processError, startTests } from '@vitest/runner';
|
|
2
|
-
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.
|
|
1
|
+
export { collectTests, processError, startTests } from '@vitest/runner';
|
|
2
|
+
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.yHaxjRhz.js';
|
|
3
3
|
export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor/coverage.BhYSDdTT.js';
|
|
4
4
|
export { s as SpyModule } from './vendor/spy.Cf_4R5Oe.js';
|
|
5
5
|
import '@vitest/utils';
|
|
@@ -5,7 +5,7 @@ import { p as prompt, f as findUp } from '../vendor/index.D6GZqexG.js';
|
|
|
5
5
|
import c from 'picocolors';
|
|
6
6
|
import { detectPackageManager, installPackage } from './install-pkg.DNUmWFkO.js';
|
|
7
7
|
import { execa } from 'execa';
|
|
8
|
-
import { c as configFiles } from '../vendor/constants.
|
|
8
|
+
import { c as configFiles } from '../vendor/constants.CsnA4eRy.js';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'node:process';
|
|
11
11
|
import '../vendor/_commonjsHelpers.BFTU3MAI.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as globalApis } from '../vendor/constants.
|
|
1
|
+
import { g as globalApis } from '../vendor/constants.CsnA4eRy.js';
|
|
2
2
|
import { V as VitestIndex } from '../vendor/index.Hqvcg1pf.js';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import '../vendor/benchmark.B6pblCp2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
|
-
import { startTests } from '@vitest/runner';
|
|
2
|
+
import { startTests, collectTests } from '@vitest/runner';
|
|
3
3
|
import 'pathe';
|
|
4
4
|
import '@vitest/runner/utils';
|
|
5
5
|
import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
|
|
@@ -7,14 +7,14 @@ import { g as getWorkerState } from '../vendor/global.7bFbnyXl.js';
|
|
|
7
7
|
import '../vendor/env.2ltrQNq0.js';
|
|
8
8
|
import { a as globalExpect, r as resetModules, v as vi } from '../vendor/vi.DXACdGTu.js';
|
|
9
9
|
import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.BhYSDdTT.js';
|
|
10
|
-
import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.
|
|
10
|
+
import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.CROIsoiT.js';
|
|
11
11
|
import { createRequire } from 'node:module';
|
|
12
12
|
import util from 'node:util';
|
|
13
13
|
import timers from 'node:timers';
|
|
14
14
|
import { isatty } from 'node:tty';
|
|
15
15
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
16
16
|
import { V as VitestIndex } from '../vendor/index.Hqvcg1pf.js';
|
|
17
|
-
import { s as setupCommonEnv } from '../vendor/setup-common.
|
|
17
|
+
import { s as setupCommonEnv } from '../vendor/setup-common.yHaxjRhz.js';
|
|
18
18
|
import { c as closeInspector } from '../vendor/inspector.hPQncR7V.js';
|
|
19
19
|
import 'std-env';
|
|
20
20
|
import 'chai';
|
|
@@ -91,7 +91,7 @@ async function withEnv({ environment }, options, fn) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
async function run(files, config, environment, executor) {
|
|
94
|
+
async function run(method, files, config, environment, executor) {
|
|
95
95
|
const workerState = getWorkerState();
|
|
96
96
|
await setupGlobalEnv(config, environment, executor);
|
|
97
97
|
await startCoverageInsideWorker(config.coverage, executor);
|
|
@@ -120,7 +120,11 @@ async function run(files, config, environment, executor) {
|
|
|
120
120
|
resetModules(workerState.moduleCache, true);
|
|
121
121
|
}
|
|
122
122
|
workerState.filepath = file;
|
|
123
|
-
|
|
123
|
+
if (method === "run") {
|
|
124
|
+
await startTests([file], runner);
|
|
125
|
+
} else {
|
|
126
|
+
await collectTests([file], runner);
|
|
127
|
+
}
|
|
124
128
|
vi.resetConfig();
|
|
125
129
|
vi.restoreAllMocks();
|
|
126
130
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as createCLI } from './vendor/cac.
|
|
1
|
+
import { c as createCLI } from './vendor/cac.CpoEMnGk.js';
|
|
2
2
|
import 'pathe';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'picocolors';
|
|
5
5
|
import './vendor/base.CTYV4Gnz.js';
|
|
6
6
|
import '@vitest/utils';
|
|
7
|
-
import './vendor/constants.
|
|
7
|
+
import './vendor/constants.CsnA4eRy.js';
|
|
8
8
|
|
|
9
9
|
createCLI().parse();
|
package/dist/config.cjs
CHANGED
|
@@ -31,6 +31,7 @@ const defaultExclude = [
|
|
|
31
31
|
const defaultCoverageExcludes = [
|
|
32
32
|
"coverage/**",
|
|
33
33
|
"dist/**",
|
|
34
|
+
"**/node_modules/**",
|
|
34
35
|
"**/[.]**",
|
|
35
36
|
"packages/*/test?(s)/**",
|
|
36
37
|
"**/*.d.ts",
|
|
@@ -40,9 +41,9 @@ const defaultCoverageExcludes = [
|
|
|
40
41
|
"cypress/**",
|
|
41
42
|
"test?(s)/**",
|
|
42
43
|
"test?(-*).?(c|m)[jt]s?(x)",
|
|
43
|
-
"**/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)",
|
|
44
|
+
"**/*{.,-}{test,spec,bench,benchmark}?(-d).?(c|m)[jt]s?(x)",
|
|
44
45
|
"**/__tests__/**",
|
|
45
|
-
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
|
|
46
|
+
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*",
|
|
46
47
|
"**/vitest.{workspace,projects}.[jt]s?(on)",
|
|
47
48
|
"**/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}"
|
|
48
49
|
];
|
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ConfigEnv, Plugin, UserConfig, mergeConfig } from 'vite';
|
|
2
|
-
export { aO as UserConfigExport, aN as UserConfigFn, aL as UserConfigFnObject, aM as UserConfigFnPromise, aQ as UserProjectConfigExport, aP as UserProjectConfigFn, K as UserWorkspaceConfig, aV as configDefaults, aY as coverageConfigDefaults, aU as defaultBrowserPort, aX as defaultExclude, aW as defaultInclude, aR as defineConfig, aS as defineProject, aT as defineWorkspace, aZ as extraInlineDeps } from './reporters-
|
|
2
|
+
export { aO as UserConfigExport, aN as UserConfigFn, aL as UserConfigFnObject, aM as UserConfigFnPromise, aQ as UserProjectConfigExport, aP as UserProjectConfigFn, K as UserWorkspaceConfig, aV as configDefaults, aY as coverageConfigDefaults, aU as defaultBrowserPort, aX as defaultExclude, aW as defaultInclude, aR as defineConfig, aS as defineProject, aT as defineWorkspace, aZ as extraInlineDeps } from './reporters-DrywOHjt.js';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
|
5
5
|
import '@vitest/snapshot';
|
|
@@ -12,5 +12,6 @@ import 'vite-node/client';
|
|
|
12
12
|
import '@vitest/snapshot/manager';
|
|
13
13
|
import 'vite-node/server';
|
|
14
14
|
import 'node:worker_threads';
|
|
15
|
+
import '@vitest/utils/source-map';
|
|
15
16
|
import 'node:fs';
|
|
16
17
|
import 'chai';
|
package/dist/config.js
CHANGED
|
@@ -29,6 +29,7 @@ const defaultExclude = [
|
|
|
29
29
|
const defaultCoverageExcludes = [
|
|
30
30
|
"coverage/**",
|
|
31
31
|
"dist/**",
|
|
32
|
+
"**/node_modules/**",
|
|
32
33
|
"**/[.]**",
|
|
33
34
|
"packages/*/test?(s)/**",
|
|
34
35
|
"**/*.d.ts",
|
|
@@ -38,9 +39,9 @@ const defaultCoverageExcludes = [
|
|
|
38
39
|
"cypress/**",
|
|
39
40
|
"test?(s)/**",
|
|
40
41
|
"test?(-*).?(c|m)[jt]s?(x)",
|
|
41
|
-
"**/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)",
|
|
42
|
+
"**/*{.,-}{test,spec,bench,benchmark}?(-d).?(c|m)[jt]s?(x)",
|
|
42
43
|
"**/__tests__/**",
|
|
43
|
-
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
|
|
44
|
+
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*",
|
|
44
45
|
"**/vitest.{workspace,projects}.[jt]s?(on)",
|
|
45
46
|
"**/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}"
|
|
46
47
|
];
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-
|
|
1
|
+
import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-DrywOHjt.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
|
@@ -12,6 +12,7 @@ import 'vite-node/client';
|
|
|
12
12
|
import '@vitest/snapshot/manager';
|
|
13
13
|
import 'vite-node/server';
|
|
14
14
|
import 'node:worker_threads';
|
|
15
|
+
import '@vitest/utils/source-map';
|
|
15
16
|
import 'node:fs';
|
|
16
17
|
import 'chai';
|
|
17
18
|
|
package/dist/environments.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Environment } from './reporters-
|
|
1
|
+
import { E as Environment } from './reporters-DrywOHjt.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
|
@@ -12,6 +12,7 @@ import 'vite-node/client';
|
|
|
12
12
|
import '@vitest/snapshot/manager';
|
|
13
13
|
import 'vite-node/server';
|
|
14
14
|
import 'node:worker_threads';
|
|
15
|
+
import '@vitest/utils/source-map';
|
|
15
16
|
import 'node:fs';
|
|
16
17
|
import 'chai';
|
|
17
18
|
|
package/dist/execute.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vm from 'node:vm';
|
|
2
2
|
import { ViteNodeRunner } from 'vite-node/client';
|
|
3
3
|
import { ViteNodeRunnerOptions } from 'vite-node';
|
|
4
|
-
import { aI as PendingSuiteMock, aJ as MockFactory, e as RuntimeRPC, W as WorkerGlobalState, aK as MockMap } from './reporters-
|
|
4
|
+
import { aI as PendingSuiteMock, aJ as MockFactory, e as RuntimeRPC, W as WorkerGlobalState, aK as MockMap } from './reporters-DrywOHjt.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import '@vitest/snapshot';
|
|
@@ -13,6 +13,7 @@ import 'node:stream';
|
|
|
13
13
|
import '@vitest/snapshot/manager';
|
|
14
14
|
import 'vite-node/server';
|
|
15
15
|
import 'node:worker_threads';
|
|
16
|
+
import '@vitest/utils/source-map';
|
|
16
17
|
import 'node:fs';
|
|
17
18
|
import 'chai';
|
|
18
19
|
|
|
@@ -135,9 +136,9 @@ declare class VitestExecutor extends ViteNodeRunner {
|
|
|
135
136
|
private primitives;
|
|
136
137
|
constructor(options: ExecuteOptions);
|
|
137
138
|
protected getContextPrimitives(): {
|
|
138
|
-
Object:
|
|
139
|
+
Object: typeof Object;
|
|
139
140
|
Reflect: typeof Reflect;
|
|
140
|
-
Symbol:
|
|
141
|
+
Symbol: typeof Symbol;
|
|
141
142
|
};
|
|
142
143
|
get state(): WorkerGlobalState;
|
|
143
144
|
shouldResolveId(id: string, _importee?: string | undefined): boolean;
|
package/dist/execute.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TaskPopulated, File, TaskResultPack } from '@vitest/runner';
|
|
2
2
|
export { CancelReason, 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, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
-
export { b as bench } from './suite-
|
|
3
|
+
export { b as bench } from './suite-CrOPuDIk.js';
|
|
4
4
|
import { ExpectStatic } from '@vitest/expect';
|
|
5
5
|
export { Assertion, AsymmetricMatchersContaining, ExpectPollOptions, ExpectStatic, JestAssertion } from '@vitest/expect';
|
|
6
|
-
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, h as RuntimeConfig,
|
|
7
|
-
export { Y as AfterSuiteRunMeta, A as ApiConfig, a1 as ArgumentsType, a0 as Arrayable, _ as Awaitable, B as BaseCoverageOptions, ah as BenchFunction, af as Benchmark, ai as BenchmarkAPI, ag as BenchmarkResult, ae as BenchmarkUserOptions, G as BrowserConfigOptions, z as BrowserScript, s as BuiltinEnvironment, t as CSSModuleScopeStrategy,
|
|
6
|
+
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, h as RuntimeConfig, i as ProvidedContext, R as ResolvedConfig, j as ModuleGraphData, k as Reporter, l as BirpcReturn } from './reporters-DrywOHjt.js';
|
|
7
|
+
export { Y as AfterSuiteRunMeta, A as ApiConfig, a1 as ArgumentsType, a0 as Arrayable, _ as Awaitable, B as BaseCoverageOptions, ah as BenchFunction, af as Benchmark, ai as BenchmarkAPI, ag as BenchmarkResult, ae as BenchmarkUserOptions, G as BrowserConfigOptions, z as BrowserScript, s as BuiltinEnvironment, t as CSSModuleScopeStrategy, n as CollectLineNumbers, o as CollectLines, a3 as Constructable, q as Context, f as ContextRPC, N as ContextTestEnvironment, ab as CoverageIstanbulOptions, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule, aa as CoverageReporter, ac as CoverageV8Options, ad as CustomProviderOptions, D as DepsOptimizationOptions, E as Environment, u as EnvironmentOptions, a5 as EnvironmentReturn, H as HappyDOMOptions, I as InlineConfig, J as JSDOMOptions, a4 as ModuleCache, a2 as MutableArray, $ as Nullable, a8 as OnServerRestartHandler, P as Pool, r as PoolOptions, y as ProjectConfig, m as RawErrsMap, a9 as ReportContext, X as ResolveIdFunction, a as ResolvedCoverageOptions, O as ResolvedTestEnvironment, p as RootAndTarget, L as RunnerRPC, e as RuntimeRPC, S as SerializableSpec, w as TransformModePatterns, T as TscErrorInfo, x as TypecheckConfig, U as UserConfig, a7 as UserConsoleLog, K as UserWorkspaceConfig, Q as Vitest, V as VitestEnvironment, v as VitestRunMode, a6 as VmEnvironmentReturn, g as WorkerContext, W as WorkerGlobalState, Z as WorkerRPC } from './reporters-DrywOHjt.js';
|
|
8
8
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
|
9
9
|
export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject } from '@vitest/spy';
|
|
10
10
|
export { SnapshotData, SnapshotMatchOptions, SnapshotResult, SnapshotSerializer, SnapshotStateOptions, SnapshotSummary, SnapshotUpdateState, UncheckedSnapshot } from '@vitest/snapshot';
|
|
@@ -22,6 +22,7 @@ import 'vite-node/client';
|
|
|
22
22
|
import '@vitest/snapshot/manager';
|
|
23
23
|
import 'vite-node/server';
|
|
24
24
|
import 'node:worker_threads';
|
|
25
|
+
import '@vitest/utils/source-map';
|
|
25
26
|
import 'node:fs';
|
|
26
27
|
|
|
27
28
|
/**
|
package/dist/node.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { v as VitestRunMode, U as UserConfig, aj as VitestOptions, Q as Vitest, R as ResolvedConfig,
|
|
2
|
-
export { ay as BrowserBuiltinProvider, az as BrowserCommand, aA as BrowserCommandContext, aE as BrowserOrchestrator, at as BrowserProvider, as as BrowserProviderInitializationOptions, av as BrowserProviderModule, ax as BrowserProviderOptions, z as BrowserScript, aB as BrowserServer, aC as BrowserServerState, aD as BrowserServerStateContext, au as CDPSession, aH as HTMLOptions, aG as JUnitOptions, aF as JsonOptions, ao as ProcessPool, aw as ResolvedBrowserOptions, ar as TestSequencerConstructor, aq as VitestPackageInstaller, ap as getFilePoolName } from './reporters-
|
|
1
|
+
import { v as VitestRunMode, U as UserConfig, aj as VitestOptions, Q as Vitest, R as ResolvedConfig, i as ProvidedContext, ak as WorkspaceProject, e as RuntimeRPC, A as ApiConfig, al as Logger, am as TestSequencer, an as WorkspaceSpec } from './reporters-DrywOHjt.js';
|
|
2
|
+
export { ay as BrowserBuiltinProvider, az as BrowserCommand, aA as BrowserCommandContext, aE as BrowserOrchestrator, at as BrowserProvider, as as BrowserProviderInitializationOptions, av as BrowserProviderModule, ax as BrowserProviderOptions, z as BrowserScript, aB as BrowserServer, aC as BrowserServerState, aD as BrowserServerStateContext, au as CDPSession, aH as HTMLOptions, aG as JUnitOptions, aF as JsonOptions, ao as ProcessPool, aw as ResolvedBrowserOptions, ar as TestSequencerConstructor, aq as VitestPackageInstaller, ap as getFilePoolName } from './reporters-DrywOHjt.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1 } from 'vite';
|
|
4
4
|
import * as vite from 'vite';
|
|
5
5
|
export { vite as Vite };
|
|
6
|
-
export { createServer, isFileServingAllowed } from 'vite';
|
|
6
|
+
export { createServer, isFileServingAllowed, parseAst, parseAstAsync } from 'vite';
|
|
7
7
|
import { Writable } from 'node:stream';
|
|
8
8
|
import createDebug from 'debug';
|
|
9
9
|
import '@vitest/runner';
|
|
@@ -17,6 +17,7 @@ import 'vite-node/client';
|
|
|
17
17
|
import '@vitest/snapshot/manager';
|
|
18
18
|
import 'vite-node/server';
|
|
19
19
|
import 'node:worker_threads';
|
|
20
|
+
import '@vitest/utils/source-map';
|
|
20
21
|
import 'node:fs';
|
|
21
22
|
import 'chai';
|
|
22
23
|
|
|
@@ -33,6 +34,10 @@ interface CliOptions extends UserConfig {
|
|
|
33
34
|
* Removes colors from the console output
|
|
34
35
|
*/
|
|
35
36
|
color?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Output collected tests as JSON or to a file
|
|
39
|
+
*/
|
|
40
|
+
json?: string | boolean;
|
|
36
41
|
}
|
|
37
42
|
/**
|
|
38
43
|
* Start Vitest programmatically
|
|
@@ -68,6 +73,15 @@ declare function resolveFsAllow(projectRoot: string, rootConfigFile: string | fa
|
|
|
68
73
|
declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(options: Options, defaultPort: number): ApiConfig | undefined;
|
|
69
74
|
declare function resolveConfig(mode: VitestRunMode, options: UserConfig, viteConfig: ResolvedConfig$1, logger: Logger): ResolvedConfig;
|
|
70
75
|
|
|
76
|
+
declare class FilesNotFoundError extends Error {
|
|
77
|
+
code: string;
|
|
78
|
+
constructor(mode: 'test' | 'benchmark');
|
|
79
|
+
}
|
|
80
|
+
declare class GitNotFoundError extends Error {
|
|
81
|
+
code: string;
|
|
82
|
+
constructor();
|
|
83
|
+
}
|
|
84
|
+
|
|
71
85
|
declare const rootDir: string;
|
|
72
86
|
declare const distDir: string;
|
|
73
87
|
|
|
@@ -78,4 +92,4 @@ declare class BaseSequencer implements TestSequencer {
|
|
|
78
92
|
sort(files: WorkspaceSpec[]): Promise<WorkspaceSpec[]>;
|
|
79
93
|
}
|
|
80
94
|
|
|
81
|
-
export { BaseSequencer, type GlobalSetupContext, TestSequencer, Vitest, VitestPlugin, WorkspaceProject, WorkspaceSpec, createDebugger, createMethodsRPC, createVitest, distDir, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest };
|
|
95
|
+
export { BaseSequencer, GitNotFoundError, type GlobalSetupContext, TestSequencer, FilesNotFoundError as TestsNotFoundError, Vitest, VitestPlugin, WorkspaceProject, WorkspaceSpec, createDebugger, createMethodsRPC, createVitest, distDir, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest };
|
package/dist/node.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, g as getFilePoolName, r as registerConsoleShortcuts, e as resolveApiServerConfig, f as resolveConfig, d as resolveFsAllow, s as startVitest } from './vendor/cli-api.
|
|
2
|
-
export { p as parseCLI } from './vendor/cac.
|
|
1
|
+
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, g as getFilePoolName, r as registerConsoleShortcuts, e as resolveApiServerConfig, f as resolveConfig, d as resolveFsAllow, s as startVitest } from './vendor/cli-api.CXFLjKVN.js';
|
|
2
|
+
export { p as parseCLI } from './vendor/cac.CpoEMnGk.js';
|
|
3
3
|
import createDebug from 'debug';
|
|
4
4
|
export { distDir, rootDir } from './path.js';
|
|
5
|
-
export { e as BaseSequencer } from './vendor/index.
|
|
6
|
-
export { createServer, isFileServingAllowed } from 'vite';
|
|
5
|
+
export { e as BaseSequencer } from './vendor/index.3x3MdmUV.js';
|
|
6
|
+
export { createServer, isFileServingAllowed, parseAst, parseAstAsync } from 'vite';
|
|
7
|
+
import 'node:fs';
|
|
7
8
|
import 'pathe';
|
|
8
|
-
import './vendor/constants.BWsVtsAj.js';
|
|
9
9
|
import './vendor/coverage.BhYSDdTT.js';
|
|
10
10
|
import './vendor/index.D4nqnQWz.js';
|
|
11
11
|
import 'node:console';
|
|
@@ -13,10 +13,10 @@ import './vendor/index.D6GZqexG.js';
|
|
|
13
13
|
import 'node:path';
|
|
14
14
|
import 'node:url';
|
|
15
15
|
import 'node:process';
|
|
16
|
-
import 'node:fs';
|
|
17
16
|
import './vendor/_commonjsHelpers.BFTU3MAI.js';
|
|
18
17
|
import 'readline';
|
|
19
18
|
import 'events';
|
|
19
|
+
import './vendor/constants.CsnA4eRy.js';
|
|
20
20
|
import 'node:worker_threads';
|
|
21
21
|
import 'os';
|
|
22
22
|
import 'path';
|
|
@@ -24,7 +24,6 @@ import 'util';
|
|
|
24
24
|
import './vendor/index.BMmMjLIQ.js';
|
|
25
25
|
import 'stream';
|
|
26
26
|
import 'fs';
|
|
27
|
-
import 'picocolors';
|
|
28
27
|
import 'vite-node/client';
|
|
29
28
|
import '@vitest/snapshot/manager';
|
|
30
29
|
import 'vite-node/server';
|
|
@@ -52,13 +51,14 @@ import 'node:fs/promises';
|
|
|
52
51
|
import 'node:module';
|
|
53
52
|
import 'node:assert';
|
|
54
53
|
import 'node:util';
|
|
54
|
+
import 'picocolors';
|
|
55
55
|
import 'vite-node/utils';
|
|
56
56
|
import 'magic-string';
|
|
57
57
|
import '@vitest/utils/ast';
|
|
58
58
|
import './vendor/index.BJmtb_7W.js';
|
|
59
59
|
import './vendor/global.7bFbnyXl.js';
|
|
60
60
|
import 'node:readline';
|
|
61
|
-
import './vendor/utils.
|
|
61
|
+
import './vendor/utils.BVMrsl6E.js';
|
|
62
62
|
import './vendor/tasks.DhVtQBtW.js';
|
|
63
63
|
import 'node:perf_hooks';
|
|
64
64
|
import './chunks/runtime-console.O41g23Zj.js';
|