vitest 1.0.3 → 1.1.0
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 +7 -0
- package/dist/browser.d.ts +1 -1
- package/dist/cli.js +11 -3
- package/dist/config.cjs +1 -0
- package/dist/config.d.ts +25 -24
- package/dist/config.js +1 -0
- package/dist/coverage.d.ts +1 -1
- package/dist/environments.d.ts +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/node.d.ts +2 -2
- package/dist/node.js +2 -2
- package/dist/{reporters-OH1c16Kq.d.ts → reporters-O4LBziQ_.d.ts} +34 -1
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +1 -1
- package/dist/runners.d.ts +1 -1
- package/dist/{suite-9ReVEt_h.d.ts → suite-dF4WyktM.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/vendor/{node.XBEcdByD.js → node.i3Lxw5di.js} +525 -320
- package/dist/vendor/{reporters.pr8MinP9.js → reporters.r0gTYN3L.js} +1 -1
- package/package.json +8 -8
package/LICENSE.md
CHANGED
|
@@ -369,6 +369,13 @@ Repository: sindresorhus/cli-truncate
|
|
|
369
369
|
|
|
370
370
|
---------------------------------------
|
|
371
371
|
|
|
372
|
+
## eastasianwidth
|
|
373
|
+
License: MIT
|
|
374
|
+
By: Masaki Komagata
|
|
375
|
+
Repository: git://github.com/komagata/eastasianwidth.git
|
|
376
|
+
|
|
377
|
+
---------------------------------------
|
|
378
|
+
|
|
372
379
|
## emoji-regex
|
|
373
380
|
License: MIT
|
|
374
381
|
By: Mathias Bynens
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { processError, startTests } from '@vitest/runner';
|
|
2
|
-
import { R as ResolvedConfig, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule } from './reporters-
|
|
2
|
+
import { R as ResolvedConfig, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule } from './reporters-O4LBziQ_.js';
|
|
3
3
|
import { VitestExecutor } from './execute.js';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import 'vite-node';
|
package/dist/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalize } from 'pathe';
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import c from 'picocolors';
|
|
4
|
-
import { v as version, s as startVitest } from './vendor/node.
|
|
4
|
+
import { v as version, s as startVitest } from './vendor/node.i3Lxw5di.js';
|
|
5
5
|
import './vendor/index.XU72Rmy8.js';
|
|
6
|
-
import { d as divider } from './vendor/reporters.
|
|
6
|
+
import { d as divider } from './vendor/reporters.r0gTYN3L.js';
|
|
7
7
|
import { t as toArray } from './vendor/base._79unx2z.js';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import 'node:path';
|
|
@@ -57,7 +57,7 @@ import './vendor/date.Ns1pGd_X.js';
|
|
|
57
57
|
import './vendor/tasks.IknbGB2n.js';
|
|
58
58
|
|
|
59
59
|
const cli = cac("vitest");
|
|
60
|
-
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("--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)").option("--project <name>", "The name of the project to run if you are using Vitest workspace feature. This can be repeated for multiple projects: --project=1 --project=2").help();
|
|
60
|
+
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("--coverage.all", "Whether to include all files, including the untested ones into report", { default: true }).option("--run", "Disable watch mode").option("--mode <name>", "Override Vite mode (default: test)").option("--workspace <path>", "Path to a workspace configuration file").option("--isolate", "Run every test file in isolation. To disable isolation, use --no-isolate (default: true)").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("--fileParallelism", "Should all test files run in parallel. Use --no-file-parallelism to disable (default: true)").option("--maxWorkers", "Maximum number of workers to run tests in").option("--minWorkers", "Minimum number of workers to run tests in").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("--exclude <glob>", "Additional file globs to be excluded from test").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)").option("--project <name>", "The name of the project to run if you are using Vitest workspace feature. This can be repeated for multiple projects: --project=1 --project=2").help();
|
|
61
61
|
cli.command("run [...filters]").action(run);
|
|
62
62
|
cli.command("related [...filters]").action(runRelated);
|
|
63
63
|
cli.command("watch [...filters]").action(watch);
|
|
@@ -110,10 +110,18 @@ function normalizeCliOptions(argv) {
|
|
|
110
110
|
argv.config = normalize(argv.config);
|
|
111
111
|
else
|
|
112
112
|
delete argv.config;
|
|
113
|
+
if (argv.workspace)
|
|
114
|
+
argv.workspace = normalize(argv.workspace);
|
|
115
|
+
else
|
|
116
|
+
delete argv.workspace;
|
|
113
117
|
if (argv.dir)
|
|
114
118
|
argv.dir = normalize(argv.dir);
|
|
115
119
|
else
|
|
116
120
|
delete argv.dir;
|
|
121
|
+
if (argv.exclude) {
|
|
122
|
+
argv.cliExclude = toArray(argv.exclude);
|
|
123
|
+
delete argv.exclude;
|
|
124
|
+
}
|
|
117
125
|
if (argv.coverage) {
|
|
118
126
|
const coverage = argv.coverage;
|
|
119
127
|
if (coverage.exclude)
|
package/dist/config.cjs
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UserConfig
|
|
1
|
+
import { UserConfig, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { a as ResolvedCoverageOptions,
|
|
3
|
+
import { a as ResolvedCoverageOptions, C as CoverageV8Options, P as ProjectConfig } from './reporters-O4LBziQ_.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import 'vite-node';
|
|
6
6
|
import '@vitest/snapshot';
|
|
@@ -18,15 +18,16 @@ import 'chai';
|
|
|
18
18
|
declare const defaultInclude: string[];
|
|
19
19
|
declare const defaultExclude: string[];
|
|
20
20
|
declare const coverageConfigDefaults: ResolvedCoverageOptions;
|
|
21
|
-
declare const
|
|
21
|
+
declare const configDefaults: Readonly<{
|
|
22
22
|
allowOnly: boolean;
|
|
23
|
+
isolate: true;
|
|
23
24
|
watch: boolean;
|
|
24
|
-
globals:
|
|
25
|
+
globals: false;
|
|
25
26
|
environment: "node";
|
|
26
27
|
pool: "threads";
|
|
27
|
-
clearMocks:
|
|
28
|
-
restoreMocks:
|
|
29
|
-
mockReset:
|
|
28
|
+
clearMocks: false;
|
|
29
|
+
restoreMocks: false;
|
|
30
|
+
mockReset: false;
|
|
30
31
|
include: string[];
|
|
31
32
|
exclude: string[];
|
|
32
33
|
testTimeout: number;
|
|
@@ -34,12 +35,12 @@ declare const config: {
|
|
|
34
35
|
teardownTimeout: number;
|
|
35
36
|
watchExclude: string[];
|
|
36
37
|
forceRerunTriggers: string[];
|
|
37
|
-
update:
|
|
38
|
+
update: false;
|
|
38
39
|
reporters: never[];
|
|
39
|
-
silent:
|
|
40
|
-
hideSkippedTests:
|
|
41
|
-
api:
|
|
42
|
-
ui:
|
|
40
|
+
silent: false;
|
|
41
|
+
hideSkippedTests: false;
|
|
42
|
+
api: false;
|
|
43
|
+
ui: false;
|
|
43
44
|
uiBase: string;
|
|
44
45
|
open: boolean;
|
|
45
46
|
css: {
|
|
@@ -52,33 +53,33 @@ declare const config: {
|
|
|
52
53
|
toFake: ("setTimeout" | "setInterval" | "clearInterval" | "clearTimeout" | "setImmediate" | "clearImmediate" | "Date")[];
|
|
53
54
|
};
|
|
54
55
|
maxConcurrency: number;
|
|
55
|
-
dangerouslyIgnoreUnhandledErrors:
|
|
56
|
+
dangerouslyIgnoreUnhandledErrors: false;
|
|
56
57
|
typecheck: {
|
|
57
58
|
checker: "tsc";
|
|
58
59
|
include: string[];
|
|
59
60
|
exclude: string[];
|
|
60
61
|
};
|
|
61
62
|
slowTestThreshold: number;
|
|
62
|
-
}
|
|
63
|
-
declare const configDefaults: Required<Pick<UserConfig, keyof typeof config>>;
|
|
63
|
+
}>;
|
|
64
64
|
|
|
65
|
-
interface UserWorkspaceConfig extends UserConfig
|
|
65
|
+
interface UserWorkspaceConfig extends UserConfig {
|
|
66
66
|
test?: ProjectConfig;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
type UserConfigFnObject = (env: ConfigEnv) => UserConfig
|
|
70
|
-
type UserConfigFnPromise = (env: ConfigEnv) => Promise<UserConfig
|
|
71
|
-
type UserConfigFn = (env: ConfigEnv) => UserConfig
|
|
72
|
-
type UserConfigExport = UserConfig
|
|
69
|
+
type UserConfigFnObject = (env: ConfigEnv) => UserConfig;
|
|
70
|
+
type UserConfigFnPromise = (env: ConfigEnv) => Promise<UserConfig>;
|
|
71
|
+
type UserConfigFn = (env: ConfigEnv) => UserConfig | Promise<UserConfig>;
|
|
72
|
+
type UserConfigExport = UserConfig | Promise<UserConfig> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
|
|
73
73
|
type UserProjectConfigFn = (env: ConfigEnv) => UserWorkspaceConfig | Promise<UserWorkspaceConfig>;
|
|
74
74
|
type UserProjectConfigExport = UserWorkspaceConfig | Promise<UserWorkspaceConfig> | UserProjectConfigFn;
|
|
75
|
-
declare function defineConfig(config: UserConfig
|
|
76
|
-
declare function defineConfig(config: Promise<UserConfig
|
|
75
|
+
declare function defineConfig(config: UserConfig): UserConfig;
|
|
76
|
+
declare function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;
|
|
77
77
|
declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
|
|
78
78
|
declare function defineConfig(config: UserConfigExport): UserConfigExport;
|
|
79
79
|
declare function defineProject<T extends UserProjectConfigExport>(config: T): T;
|
|
80
|
-
|
|
80
|
+
type Workspace = (string | (UserProjectConfigExport & {
|
|
81
81
|
extends?: string;
|
|
82
|
-
}))
|
|
82
|
+
}));
|
|
83
|
+
declare function defineWorkspace(config: Workspace[]): Workspace[];
|
|
83
84
|
|
|
84
85
|
export { type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserProjectConfigExport, type UserProjectConfigFn, type UserWorkspaceConfig, configDefaults, coverageConfigDefaults, defaultExclude, defaultInclude, defineConfig, defineProject, defineWorkspace };
|
package/dist/config.js
CHANGED
package/dist/coverage.d.ts
CHANGED
package/dist/environments.d.ts
CHANGED
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 { am as PendingSuiteMock, an as MockFactory, ao as MockMap, a2 as WorkerGlobalState, g as RuntimeRPC } from './reporters-
|
|
4
|
+
import { am as PendingSuiteMock, an as MockFactory, ao as MockMap, a2 as WorkerGlobalState, g as RuntimeRPC } from './reporters-O4LBziQ_.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import '@vitest/snapshot';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TaskPopulated, File, TaskResultPack, CancelReason } from '@vitest/runner';
|
|
2
2
|
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';
|
|
3
|
-
export { b as bench } from './suite-
|
|
3
|
+
export { b as bench } from './suite-dF4WyktM.js';
|
|
4
4
|
import { ExpectStatic } from '@vitest/expect';
|
|
5
5
|
export { Assertion, AsymmetricMatchersContaining, ExpectStatic, JestAssertion } from '@vitest/expect';
|
|
6
|
-
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, n as RuntimeConfig, f as ProvidedContext, A as AfterSuiteRunMeta, o as UserConsoleLog, R as ResolvedConfig, p as ModuleGraphData, q as Reporter } from './reporters-
|
|
7
|
-
export { K as ApiConfig, a6 as ArgumentsType, a5 as Arrayable, a3 as Awaitable, B as BaseCoverageOptions, ak as BenchFunction, ai as Benchmark, al as BenchmarkAPI, aj as BenchmarkResult, ah as BenchmarkUserOptions, D as BuiltinEnvironment, I as CSSModuleScopeStrategy, u as CollectLineNumbers, v as CollectLines, a8 as Constructable, x as Context, _ as ContextRPC, Y as ContextTestEnvironment, af as CoverageIstanbulOptions, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule, ae as CoverageReporter, C as CoverageV8Options, ag as CustomProviderOptions, N as DepsOptimizationOptions, E as Environment, L as EnvironmentOptions, aa as EnvironmentReturn, H as HappyDOMOptions, Q as InlineConfig, J as JSDOMOptions, a9 as ModuleCache, a7 as MutableArray, a4 as Nullable, ac as OnServerRestartHandler, y as Pool, z as PoolOptions, P as ProjectConfig, r as RawErrsMap, ad as ReportContext, a0 as ResolveIdFunction, a as ResolvedCoverageOptions, Z as ResolvedTestEnvironment, w as RootAndTarget, X as RunnerRPC, g as RuntimeRPC, O as TransformModePatterns, t as TscErrorInfo, S as TypecheckConfig, U as UserConfig, e as Vitest, G as VitestEnvironment, V as VitestRunMode, ab as VmEnvironmentReturn, $ as WorkerContext, a2 as WorkerGlobalState, a1 as WorkerRPC } from './reporters-
|
|
6
|
+
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, n as RuntimeConfig, f as ProvidedContext, A as AfterSuiteRunMeta, o as UserConsoleLog, R as ResolvedConfig, p as ModuleGraphData, q as Reporter } from './reporters-O4LBziQ_.js';
|
|
7
|
+
export { K as ApiConfig, a6 as ArgumentsType, a5 as Arrayable, a3 as Awaitable, B as BaseCoverageOptions, ak as BenchFunction, ai as Benchmark, al as BenchmarkAPI, aj as BenchmarkResult, ah as BenchmarkUserOptions, D as BuiltinEnvironment, I as CSSModuleScopeStrategy, u as CollectLineNumbers, v as CollectLines, a8 as Constructable, x as Context, _ as ContextRPC, Y as ContextTestEnvironment, af as CoverageIstanbulOptions, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule, ae as CoverageReporter, C as CoverageV8Options, ag as CustomProviderOptions, N as DepsOptimizationOptions, E as Environment, L as EnvironmentOptions, aa as EnvironmentReturn, H as HappyDOMOptions, Q as InlineConfig, J as JSDOMOptions, a9 as ModuleCache, a7 as MutableArray, a4 as Nullable, ac as OnServerRestartHandler, y as Pool, z as PoolOptions, P as ProjectConfig, r as RawErrsMap, ad as ReportContext, a0 as ResolveIdFunction, a as ResolvedCoverageOptions, Z as ResolvedTestEnvironment, w as RootAndTarget, X as RunnerRPC, g as RuntimeRPC, O as TransformModePatterns, t as TscErrorInfo, S as TypecheckConfig, U as UserConfig, e as Vitest, G as VitestEnvironment, V as VitestRunMode, ab as VmEnvironmentReturn, $ as WorkerContext, a2 as WorkerGlobalState, a1 as WorkerRPC } from './reporters-O4LBziQ_.js';
|
|
8
8
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
|
9
9
|
export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject, SpyInstance } from '@vitest/spy';
|
|
10
10
|
export { SnapshotEnvironment } from '@vitest/snapshot/environment';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VitestRunMode, U as UserConfig, e as Vitest, R as ResolvedConfig, f as ProvidedContext, W as WorkspaceProject, g as RuntimeRPC, T as TestSequencer, h as WorkspaceSpec } from './reporters-
|
|
2
|
-
export { l as BrowserProvider, k as BrowserProviderInitializationOptions, m as BrowserProviderOptions, i as ProcessPool, j as TestSequencerConstructor, s as startVitest } from './reporters-
|
|
1
|
+
import { V as VitestRunMode, U as UserConfig, e as Vitest, R as ResolvedConfig, f as ProvidedContext, W as WorkspaceProject, g as RuntimeRPC, T as TestSequencer, h as WorkspaceSpec } from './reporters-O4LBziQ_.js';
|
|
2
|
+
export { l as BrowserProvider, k as BrowserProviderInitializationOptions, m as BrowserProviderOptions, i as ProcessPool, j as TestSequencerConstructor, s as startVitest } from './reporters-O4LBziQ_.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import 'vite-node';
|
package/dist/node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/node.
|
|
1
|
+
export { B as BaseSequencer, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/node.i3Lxw5di.js';
|
|
2
2
|
import 'pathe';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'node:path';
|
|
@@ -41,7 +41,7 @@ import 'node:module';
|
|
|
41
41
|
import 'local-pkg';
|
|
42
42
|
import 'module';
|
|
43
43
|
import 'acorn-walk';
|
|
44
|
-
import './vendor/reporters.
|
|
44
|
+
import './vendor/reporters.r0gTYN3L.js';
|
|
45
45
|
import './chunks/runtime-console.hf2msWA9.js';
|
|
46
46
|
import 'node:stream';
|
|
47
47
|
import 'node:console';
|
|
@@ -865,6 +865,7 @@ declare class Vitest {
|
|
|
865
865
|
private createCoreProject;
|
|
866
866
|
getCoreWorkspaceProject(): WorkspaceProject;
|
|
867
867
|
getProjectByTaskId(taskId: string): WorkspaceProject;
|
|
868
|
+
private getWorkspaceConfigPath;
|
|
868
869
|
private resolveWorkspace;
|
|
869
870
|
private initCoverageProvider;
|
|
870
871
|
private initBrowserProviders;
|
|
@@ -1882,6 +1883,14 @@ interface InlineConfig {
|
|
|
1882
1883
|
* ]
|
|
1883
1884
|
*/
|
|
1884
1885
|
environmentMatchGlobs?: [string, VitestEnvironment][];
|
|
1886
|
+
/**
|
|
1887
|
+
* Run tests in an isolated environment. This option has no effect on vmThreads pool.
|
|
1888
|
+
*
|
|
1889
|
+
* Disabling this option might improve performance if your code doesn't rely on side effects.
|
|
1890
|
+
*
|
|
1891
|
+
* @default true
|
|
1892
|
+
*/
|
|
1893
|
+
isolate?: boolean;
|
|
1885
1894
|
/**
|
|
1886
1895
|
* Pool used to run tests in.
|
|
1887
1896
|
*
|
|
@@ -1894,6 +1903,21 @@ interface InlineConfig {
|
|
|
1894
1903
|
* Pool options
|
|
1895
1904
|
*/
|
|
1896
1905
|
poolOptions?: PoolOptions;
|
|
1906
|
+
/**
|
|
1907
|
+
* Maximum number of workers to run tests in. `poolOptions.{threads,vmThreads}.maxThreads`/`poolOptions.forks.maxForks` has higher priority.
|
|
1908
|
+
*/
|
|
1909
|
+
maxWorkers?: number;
|
|
1910
|
+
/**
|
|
1911
|
+
* Minimum number of workers to run tests in. `poolOptions.{threads,vmThreads}.minThreads`/`poolOptions.forks.minForks` has higher priority.
|
|
1912
|
+
*/
|
|
1913
|
+
minWorkers?: number;
|
|
1914
|
+
/**
|
|
1915
|
+
* Should all test files run in parallel. Doesn't affect tests running in the same file.
|
|
1916
|
+
* Setting this to `false` will override `maxWorkers` and `minWorkers` options to `1`.
|
|
1917
|
+
*
|
|
1918
|
+
* @default true
|
|
1919
|
+
*/
|
|
1920
|
+
fileParallelism?: boolean;
|
|
1897
1921
|
/**
|
|
1898
1922
|
* Automatically assign pool based on globs. The first match will be used.
|
|
1899
1923
|
*
|
|
@@ -1908,6 +1932,10 @@ interface InlineConfig {
|
|
|
1908
1932
|
* ]
|
|
1909
1933
|
*/
|
|
1910
1934
|
poolMatchGlobs?: [string, Exclude<Pool, 'browser'>][];
|
|
1935
|
+
/**
|
|
1936
|
+
* Path to a workspace configuration file
|
|
1937
|
+
*/
|
|
1938
|
+
workspace?: string;
|
|
1911
1939
|
/**
|
|
1912
1940
|
* Update snapshot
|
|
1913
1941
|
*
|
|
@@ -2262,8 +2290,12 @@ interface UserConfig extends InlineConfig {
|
|
|
2262
2290
|
* Name of the project or projects to run.
|
|
2263
2291
|
*/
|
|
2264
2292
|
project?: string | string[];
|
|
2293
|
+
/**
|
|
2294
|
+
* Additional exclude patterns
|
|
2295
|
+
*/
|
|
2296
|
+
cliExclude?: string[];
|
|
2265
2297
|
}
|
|
2266
|
-
interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters' | 'browser' | 'coverage' | 'testNamePattern' | 'related' | 'api' | 'reporters' | 'resolveSnapshotPath' | 'benchmark' | 'shard' | 'cache' | 'sequence' | 'typecheck' | 'runner' | 'poolOptions' | 'pool'> {
|
|
2298
|
+
interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters' | 'browser' | 'coverage' | 'testNamePattern' | 'related' | 'api' | 'reporters' | 'resolveSnapshotPath' | 'benchmark' | 'shard' | 'cache' | 'sequence' | 'typecheck' | 'runner' | 'poolOptions' | 'pool' | 'cliExclude'> {
|
|
2267
2299
|
mode: VitestRunMode;
|
|
2268
2300
|
base?: string;
|
|
2269
2301
|
config?: string;
|
|
@@ -2278,6 +2310,7 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters'
|
|
|
2278
2310
|
reporters: (Reporter | BuiltinReporters)[];
|
|
2279
2311
|
defines: Record<string, any>;
|
|
2280
2312
|
api?: ApiConfig;
|
|
2313
|
+
cliExclude?: string[];
|
|
2281
2314
|
benchmark?: Required<Omit<BenchmarkUserOptions, 'outputFile'>> & Pick<BenchmarkUserOptions, 'outputFile'>;
|
|
2282
2315
|
shard?: {
|
|
2283
2316
|
index: number;
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ay as BaseReporter, aq as BasicReporter, aC as BenchmarkBuiltinReporters, aB as BenchmarkReportsMap, aA as BuiltinReporters, ap as DefaultReporter, ar as DotReporter, ax as HangingProcessReporter, av as JUnitReporter, as as JsonReporter, q as Reporter, az as ReportersMap, aw as TapFlatReporter, au as TapReporter, at as VerboseReporter } from './reporters-
|
|
1
|
+
export { ay as BaseReporter, aq as BasicReporter, aC as BenchmarkBuiltinReporters, aB as BenchmarkReportsMap, aA as BuiltinReporters, ap as DefaultReporter, ar as DotReporter, ax as HangingProcessReporter, av as JUnitReporter, as as JsonReporter, q as Reporter, az as ReportersMap, aw as TapFlatReporter, au as TapReporter, at as VerboseReporter } from './reporters-O4LBziQ_.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
package/dist/reporters.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { e as BasicReporter, B as BenchmarkReportsMap, D as DefaultReporter, f as DotReporter, H as HangingProcessReporter, g as JUnitReporter, J as JsonReporter, R as ReportersMap, h as TapFlatReporter, T as TapReporter, V as VerboseReporter } from './vendor/reporters.r0gTYN3L.js';
|
|
2
2
|
import 'node:perf_hooks';
|
|
3
3
|
import 'picocolors';
|
|
4
4
|
import './vendor/index.XU72Rmy8.js';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VitestRunner, VitestRunnerImportSource, Suite, Test, CancelReason, Custom, TaskContext, ExtendedContext } from '@vitest/runner';
|
|
2
|
-
import { R as ResolvedConfig } from './reporters-
|
|
2
|
+
import { R as ResolvedConfig } from './reporters-O4LBziQ_.js';
|
|
3
3
|
import * as tinybench from 'tinybench';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import 'vite-node';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Custom } from '@vitest/runner';
|
|
2
2
|
import '@vitest/runner/utils';
|
|
3
|
-
import { ak as BenchFunction, al as BenchmarkAPI } from './reporters-
|
|
3
|
+
import { ak as BenchFunction, al as BenchmarkAPI } from './reporters-O4LBziQ_.js';
|
|
4
4
|
import { Options } from 'tinybench';
|
|
5
5
|
|
|
6
6
|
declare function getBenchOptions(key: Custom): Options;
|
package/dist/suite.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createTaskCollector, getCurrentSuite, getFn, setFn } from '@vitest/runner';
|
|
2
2
|
export { createChainable } from '@vitest/runner/utils';
|
|
3
|
-
export { g as getBenchFn, a as getBenchOptions } from './suite-
|
|
4
|
-
import './reporters-
|
|
3
|
+
export { g as getBenchFn, a as getBenchOptions } from './suite-dF4WyktM.js';
|
|
4
|
+
import './reporters-O4LBziQ_.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import 'vite-node';
|
|
7
7
|
import '@vitest/snapshot';
|