vitest 0.23.1 → 0.23.4
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 +3 -3
- package/dist/browser.mjs +7 -7
- package/dist/{chunk-api-setup.9e83ca0a.mjs → chunk-api-setup.11cfd513.mjs} +5 -5
- package/dist/{chunk-constants.6196597b.mjs → chunk-constants.71e8a211.mjs} +0 -0
- package/dist/{chunk-install-pkg.e081fc1b.mjs → chunk-install-pkg.3aa3eae6.mjs} +3 -3
- package/dist/{chunk-integrations-globals.b1aa52c3.mjs → chunk-integrations-globals.d8c90af9.mjs} +6 -6
- package/dist/{chunk-mock-date.f63a5ff2.mjs → chunk-mock-date.2917be60.mjs} +2 -2
- package/dist/{chunk-node-git.6f289b0a.mjs → chunk-node-git.a44b4872.mjs} +4 -4
- package/dist/{chunk-runtime-chain.8bfc559b.mjs → chunk-runtime-chain.0ab05798.mjs} +13 -25
- package/dist/{chunk-runtime-error.252dd130.mjs → chunk-runtime-error.f5506f40.mjs} +45 -30
- package/dist/{chunk-runtime-hooks.c6b06bd8.mjs → chunk-runtime-hooks.e4219ed5.mjs} +3 -3
- package/dist/{chunk-runtime-mocker.d9690273.mjs → chunk-runtime-mocker.4bbb070f.mjs} +19 -9
- package/dist/{chunk-runtime-rpc.48bd94e3.mjs → chunk-runtime-rpc.00a890d2.mjs} +1 -1
- package/dist/{chunk-utils-source-map.a1647f5f.mjs → chunk-utils-source-map.2be5aa48.mjs} +2 -2
- package/dist/{chunk-vite-node-client.998e04d0.mjs → chunk-vite-node-client.da0a17ff.mjs} +2 -2
- package/dist/{chunk-vite-node-debug.2d8a1dc3.mjs → chunk-vite-node-debug.536c4c5b.mjs} +1 -1
- package/dist/{chunk-vite-node-externalize.3035bd5b.mjs → chunk-vite-node-externalize.8d8032d0.mjs} +1192 -1101
- package/dist/{chunk-vite-node-utils.8a9b3014.mjs → chunk-vite-node-utils.473cd0b2.mjs} +1 -1
- package/dist/cli-wrapper.mjs +7 -5
- package/dist/cli.mjs +9 -9
- package/dist/config.d.ts +1 -1
- package/dist/entry.mjs +7 -7
- package/dist/environments.d.ts +1 -1
- package/dist/{global-ea084c9f.d.ts → global-e98f203b.d.ts} +22 -5
- package/dist/{index-5f09f4d0.d.ts → index-6e18a03a.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +6 -6
- package/dist/loader.mjs +3 -3
- package/dist/node.d.ts +2 -2
- package/dist/node.mjs +9 -9
- package/dist/suite.mjs +5 -5
- package/dist/{vendor-index.731a22f2.mjs → vendor-index.29636037.mjs} +0 -0
- package/dist/{vendor-index.62ce5c33.mjs → vendor-index.2ae8040a.mjs} +0 -0
- package/dist/{vendor-index.13e3bda3.mjs → vendor-index.9d9196cc.mjs} +0 -0
- package/dist/{vendor-index.4aeeb598.mjs → vendor-index.fbec8a81.mjs} +2 -2
- package/dist/worker.mjs +6 -6
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pathToFileURL, fileURLToPath as fileURLToPath$1, URL as URL$1 } from 'url';
|
|
2
|
-
import { a as resolve$1, r as relative } from './chunk-constants.
|
|
2
|
+
import { a as resolve$1, r as relative } from './chunk-constants.71e8a211.mjs';
|
|
3
3
|
import { builtinModules } from 'module';
|
|
4
4
|
import fs, { promises, statSync, existsSync, realpathSync, Stats } from 'fs';
|
|
5
5
|
import path from 'path';
|
package/dist/cli-wrapper.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import { p as picocolors, E as EXIT_CODE_RESTART } from './chunk-constants.
|
|
3
|
-
import { e as execa } from './vendor-index.
|
|
2
|
+
import { p as picocolors, E as EXIT_CODE_RESTART } from './chunk-constants.71e8a211.mjs';
|
|
3
|
+
import { e as execa } from './vendor-index.fbec8a81.mjs';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'path';
|
|
6
6
|
import 'buffer';
|
|
7
7
|
import 'child_process';
|
|
8
8
|
import 'process';
|
|
9
|
-
import './vendor-index.
|
|
9
|
+
import './vendor-index.2ae8040a.mjs';
|
|
10
10
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
11
11
|
import 'fs';
|
|
12
12
|
import 'stream';
|
|
13
13
|
import 'util';
|
|
14
14
|
import 'os';
|
|
15
|
-
import './vendor-index.
|
|
15
|
+
import './vendor-index.29636037.mjs';
|
|
16
16
|
import 'assert';
|
|
17
17
|
import 'events';
|
|
18
18
|
|
|
@@ -20,7 +20,9 @@ const ENTRY = new URL("./cli.mjs", import.meta.url);
|
|
|
20
20
|
const NODE_ARGS = [
|
|
21
21
|
"--inspect",
|
|
22
22
|
"--inspect-brk",
|
|
23
|
-
"--trace-deprecation"
|
|
23
|
+
"--trace-deprecation",
|
|
24
|
+
"--experimental-wasm-threads",
|
|
25
|
+
"--wasm-atomics-on-non-shared-memory"
|
|
24
26
|
];
|
|
25
27
|
const SegfaultErrors = [
|
|
26
28
|
{
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { p as picocolors } from './chunk-constants.
|
|
3
|
-
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.
|
|
2
|
+
import { p as picocolors } from './chunk-constants.71e8a211.mjs';
|
|
3
|
+
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.8d8032d0.mjs';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'url';
|
|
6
6
|
import 'path';
|
|
@@ -8,7 +8,7 @@ import './chunk-integrations-coverage.99c020eb.mjs';
|
|
|
8
8
|
import 'local-pkg';
|
|
9
9
|
import './chunk-env-node.ceb43f1c.mjs';
|
|
10
10
|
import 'console';
|
|
11
|
-
import './chunk-mock-date.
|
|
11
|
+
import './chunk-mock-date.2917be60.mjs';
|
|
12
12
|
import 'vite';
|
|
13
13
|
import 'process';
|
|
14
14
|
import 'fs';
|
|
@@ -16,20 +16,20 @@ import 'os';
|
|
|
16
16
|
import 'util';
|
|
17
17
|
import 'stream';
|
|
18
18
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
19
|
-
import './chunk-vite-node-client.
|
|
19
|
+
import './chunk-vite-node-client.da0a17ff.mjs';
|
|
20
20
|
import 'module';
|
|
21
21
|
import 'vm';
|
|
22
|
-
import './chunk-vite-node-utils.
|
|
22
|
+
import './chunk-vite-node-utils.473cd0b2.mjs';
|
|
23
23
|
import 'assert';
|
|
24
24
|
import 'debug';
|
|
25
25
|
import 'perf_hooks';
|
|
26
26
|
import 'worker_threads';
|
|
27
27
|
import 'tinypool';
|
|
28
|
-
import './chunk-utils-source-map.
|
|
28
|
+
import './chunk-utils-source-map.2be5aa48.mjs';
|
|
29
29
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
30
30
|
import 'crypto';
|
|
31
|
-
import './vendor-index.
|
|
32
|
-
import './vendor-index.
|
|
31
|
+
import './vendor-index.9d9196cc.mjs';
|
|
32
|
+
import './vendor-index.29636037.mjs';
|
|
33
33
|
import './chunk-magic-string.56b2b543.mjs';
|
|
34
34
|
import 'strip-literal';
|
|
35
35
|
import 'readline';
|
|
@@ -671,7 +671,7 @@ async function run(cliFilters, options) {
|
|
|
671
671
|
await start("test", cliFilters, options);
|
|
672
672
|
}
|
|
673
673
|
async function benchmark(cliFilters, options) {
|
|
674
|
-
console.warn(picocolors.exports.yellow("Benchmarking is an experimental feature
|
|
674
|
+
console.warn(picocolors.exports.yellow("Benchmarking is an experimental feature.\nBreaking changes might not follow semver, please pin Vitest's version when using it."));
|
|
675
675
|
await start("benchmark", cliFilters, options);
|
|
676
676
|
}
|
|
677
677
|
async function start(mode, cliFilters, options) {
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserConfig as UserConfig$2, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv } from 'vite';
|
|
3
|
-
import { U as UserConfig$1, ad as ResolvedCoverageOptions, F as FakeTimerInstallOpts } from './global-
|
|
3
|
+
import { U as UserConfig$1, ad as ResolvedCoverageOptions, F as FakeTimerInstallOpts } from './global-e98f203b.js';
|
|
4
4
|
import 'tinybench';
|
|
5
5
|
import 'fs';
|
|
6
6
|
import 'worker_threads';
|
package/dist/entry.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import { g as getWorkerState, a as resetModules } from './chunk-mock-date.
|
|
2
|
+
import { g as getWorkerState, a as resetModules } from './chunk-mock-date.2917be60.mjs';
|
|
3
3
|
import { a as envs } from './chunk-env-node.ceb43f1c.mjs';
|
|
4
|
-
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-error.
|
|
4
|
+
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-error.f5506f40.mjs';
|
|
5
5
|
import 'path';
|
|
6
|
-
import './chunk-constants.
|
|
6
|
+
import './chunk-constants.71e8a211.mjs';
|
|
7
7
|
import 'tty';
|
|
8
8
|
import 'url';
|
|
9
9
|
import 'local-pkg';
|
|
10
10
|
import 'console';
|
|
11
11
|
import 'perf_hooks';
|
|
12
12
|
import './chunk-integrations-coverage.99c020eb.mjs';
|
|
13
|
-
import './chunk-runtime-hooks.
|
|
14
|
-
import './chunk-runtime-chain.
|
|
13
|
+
import './chunk-runtime-hooks.e4219ed5.mjs';
|
|
14
|
+
import './chunk-runtime-chain.0ab05798.mjs';
|
|
15
15
|
import 'util';
|
|
16
16
|
import 'chai';
|
|
17
17
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
18
|
-
import './chunk-runtime-rpc.
|
|
18
|
+
import './chunk-runtime-rpc.00a890d2.mjs';
|
|
19
19
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
20
|
-
import './chunk-utils-source-map.
|
|
20
|
+
import './chunk-utils-source-map.2be5aa48.mjs';
|
|
21
21
|
import './spy.mjs';
|
|
22
22
|
import 'tinyspy';
|
|
23
23
|
|
package/dist/environments.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, CommonServerOptions, AliasOptions } from 'vite';
|
|
2
|
-
import { Options, TaskResult as TaskResult$1, Bench } from 'tinybench';
|
|
2
|
+
import { Task as Task$1, Options, TaskResult as TaskResult$1, Bench } from 'tinybench';
|
|
3
3
|
import { Stats } from 'fs';
|
|
4
4
|
import { MessagePort } from 'worker_threads';
|
|
5
5
|
|
|
@@ -166,6 +166,10 @@ interface Update {
|
|
|
166
166
|
path: string
|
|
167
167
|
acceptedPath: string
|
|
168
168
|
timestamp: number
|
|
169
|
+
/**
|
|
170
|
+
* @experimental internal
|
|
171
|
+
*/
|
|
172
|
+
explicitImportRequired?: boolean | undefined
|
|
169
173
|
}
|
|
170
174
|
|
|
171
175
|
interface PrunePayload {
|
|
@@ -603,6 +607,7 @@ declare abstract class BaseReporter implements Reporter {
|
|
|
603
607
|
private _lastRunCount;
|
|
604
608
|
private _timeStart;
|
|
605
609
|
constructor();
|
|
610
|
+
get mode(): VitestRunMode;
|
|
606
611
|
onInit(ctx: Vitest): void;
|
|
607
612
|
relative(path: string): string;
|
|
608
613
|
onFinished(files?: File[], errors?: unknown[]): Promise<void>;
|
|
@@ -614,6 +619,9 @@ declare abstract class BaseReporter implements Reporter {
|
|
|
614
619
|
shouldLog(log: UserConsoleLog): boolean;
|
|
615
620
|
onServerRestart(reason?: string): void;
|
|
616
621
|
reportSummary(files: File[]): Promise<void>;
|
|
622
|
+
reportTestSummary(files: File[]): Promise<void>;
|
|
623
|
+
private printErrorsSummary;
|
|
624
|
+
reportBenchmarkSummary(files: File[]): Promise<void>;
|
|
617
625
|
private printTaskErrors;
|
|
618
626
|
registerUnhandledRejection(): void;
|
|
619
627
|
}
|
|
@@ -1040,7 +1048,7 @@ interface BenchmarkUserOptions {
|
|
|
1040
1048
|
*/
|
|
1041
1049
|
exclude?: string[];
|
|
1042
1050
|
/**
|
|
1043
|
-
* Include globs for in-source test files
|
|
1051
|
+
* Include globs for in-source benchmark test files
|
|
1044
1052
|
*
|
|
1045
1053
|
* @default []
|
|
1046
1054
|
*/
|
|
@@ -1050,12 +1058,18 @@ interface BenchmarkUserOptions {
|
|
|
1050
1058
|
* and/or paths to custom reporters
|
|
1051
1059
|
*/
|
|
1052
1060
|
reporters?: Arrayable<BenchmarkBuiltinReporters | Reporter>;
|
|
1061
|
+
/**
|
|
1062
|
+
* Write test results to a file when the `--reporter=json` option is also specified.
|
|
1063
|
+
* Also definable individually per reporter by using an object instead.
|
|
1064
|
+
*/
|
|
1065
|
+
outputFile?: string | (Partial<Record<BenchmarkBuiltinReporters, string>> & Record<string, string>);
|
|
1053
1066
|
}
|
|
1054
1067
|
interface Benchmark extends TaskBase {
|
|
1055
1068
|
type: 'benchmark';
|
|
1056
1069
|
suite: Suite;
|
|
1057
1070
|
result?: TaskResult;
|
|
1058
1071
|
fails?: boolean;
|
|
1072
|
+
task?: Task$1;
|
|
1059
1073
|
options: Options;
|
|
1060
1074
|
}
|
|
1061
1075
|
interface BenchmarkResult extends TaskResult$1 {
|
|
@@ -1063,7 +1077,7 @@ interface BenchmarkResult extends TaskResult$1 {
|
|
|
1063
1077
|
rank: number;
|
|
1064
1078
|
}
|
|
1065
1079
|
declare type BenchFunction = (this: Bench) => Promise<void> | void;
|
|
1066
|
-
declare type BenchmarkAPI = ChainableFunction<'skip', [
|
|
1080
|
+
declare type BenchmarkAPI = ChainableFunction<'skip' | 'only', [
|
|
1067
1081
|
name: string,
|
|
1068
1082
|
fn: BenchFunction,
|
|
1069
1083
|
options?: Options
|
|
@@ -1170,7 +1184,8 @@ declare type TestAPI<ExtraContext = {}> = ChainableTestAPI<ExtraContext> & {
|
|
|
1170
1184
|
};
|
|
1171
1185
|
declare type ChainableSuiteAPI<ExtraContext = {}> = ChainableFunction<'concurrent' | 'only' | 'skip' | 'todo' | 'shuffle', [
|
|
1172
1186
|
name: string,
|
|
1173
|
-
factory?: SuiteFactory<ExtraContext
|
|
1187
|
+
factory?: SuiteFactory<ExtraContext>,
|
|
1188
|
+
options?: number | TestOptions
|
|
1174
1189
|
], SuiteCollector<ExtraContext>, {
|
|
1175
1190
|
each: TestEachFunction;
|
|
1176
1191
|
<T extends ExtraContext>(name: string, factory?: SuiteFactory<T>): SuiteCollector<T>;
|
|
@@ -1949,7 +1964,9 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters'
|
|
|
1949
1964
|
reporters: (Reporter | BuiltinReporters)[];
|
|
1950
1965
|
defines: Record<string, any>;
|
|
1951
1966
|
api?: ApiConfig;
|
|
1952
|
-
benchmark?: Required<BenchmarkUserOptions
|
|
1967
|
+
benchmark?: Required<Omit<BenchmarkUserOptions, 'outputFile'>> & {
|
|
1968
|
+
outputFile?: BenchmarkUserOptions['outputFile'];
|
|
1969
|
+
};
|
|
1953
1970
|
shard?: {
|
|
1954
1971
|
index: number;
|
|
1955
1972
|
count: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpyImpl } from 'tinyspy';
|
|
2
|
-
import { m as SuiteAPI, l as TestAPI, al as BenchmarkAPI, o as SuiteHooks, H as HookListener, s as TestContext, S as Suite, n as HookCleanupCallback, h as Test } from './global-
|
|
2
|
+
import { m as SuiteAPI, l as TestAPI, al as BenchmarkAPI, o as SuiteHooks, H as HookListener, s as TestContext, S as Suite, n as HookCleanupCallback, h as Test } from './global-e98f203b.js';
|
|
3
3
|
|
|
4
4
|
interface MockResultReturn<T> {
|
|
5
5
|
type: 'return';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as spyOn, f as fn, M as MaybeMockedDeep, a as MaybeMocked, b as MaybePartiallyMocked, c as MaybePartiallyMockedDeep, E as EnhancedSpy } from './index-
|
|
2
|
-
export { E as EnhancedSpy, r as Mock, u as MockContext, q as MockInstance, v as Mocked, w as MockedClass, o as MockedFunction, p as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, h as beforeAll, k as beforeEach, g as bench, n as createExpect, e as describe, m as expect, i as it, d as suite, t as test } from './index-
|
|
3
|
-
import { D as DoneCallback, F as FakeTimerInstallOpts, a as File, T as TaskResultPack, R as ResolvedConfig, M as ModuleGraphData, b as Reporter } from './global-
|
|
4
|
-
export { L as AfterSuiteRunMeta, A as ApiConfig, Y as ArgumentsType, X as Arrayable, P as Awaitable, ae as BaseCoverageOptions, ak as BenchFunction, ai as Benchmark, al as BenchmarkAPI, aj as BenchmarkResult, ah as BenchmarkUserOptions, B as BuiltinEnvironment, C as CSSModuleScopeStrategy, a0 as Constructable, ag as CoverageC8Options, af as CoverageIstanbulOptions, ac as CoverageOptions, a9 as CoverageProvider, aa as CoverageProviderModule, ab as CoverageReporter, _ as DeepMerge, D as DoneCallback, a3 as Environment, E as EnvironmentOptions, a2 as EnvironmentReturn, a7 as ErrorWithDiff, a as File, n as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, Z as MergeInsertions, a1 as ModuleCache, M as ModuleGraphData, $ as MutableArray, Q as Nullable, a8 as OnServerRestartHandler, a6 as ParsedStack, a5 as Position, b as Reporter, K as ResolveIdFunction, R as ResolvedConfig, ad as ResolvedCoverageOptions, d as RunMode, r as RuntimeContext, u as SnapshotData, x as SnapshotMatchOptions, y as SnapshotResult, w as SnapshotStateOptions, G as SnapshotSummary, v as SnapshotUpdateState, S as Suite, m as SuiteAPI, p as SuiteCollector, q as SuiteFactory, o as SuiteHooks, i as Task, f as TaskBase, g as TaskResult, T as TaskResultPack, e as TaskState, h as Test, l as TestAPI, s as TestContext, j as TestFunction, k as TestOptions, z as UncheckedSnapshot, U as UserConfig, a4 as UserConsoleLog, t as Vitest, V as VitestEnvironment, c as VitestRunMode, W as WorkerContext, O as WorkerGlobalState, N as WorkerRPC } from './global-
|
|
1
|
+
import { s as spyOn, f as fn, M as MaybeMockedDeep, a as MaybeMocked, b as MaybePartiallyMocked, c as MaybePartiallyMockedDeep, E as EnhancedSpy } from './index-6e18a03a.js';
|
|
2
|
+
export { E as EnhancedSpy, r as Mock, u as MockContext, q as MockInstance, v as Mocked, w as MockedClass, o as MockedFunction, p as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, h as beforeAll, k as beforeEach, g as bench, n as createExpect, e as describe, m as expect, i as it, d as suite, t as test } from './index-6e18a03a.js';
|
|
3
|
+
import { D as DoneCallback, F as FakeTimerInstallOpts, a as File, T as TaskResultPack, R as ResolvedConfig, M as ModuleGraphData, b as Reporter } from './global-e98f203b.js';
|
|
4
|
+
export { L as AfterSuiteRunMeta, A as ApiConfig, Y as ArgumentsType, X as Arrayable, P as Awaitable, ae as BaseCoverageOptions, ak as BenchFunction, ai as Benchmark, al as BenchmarkAPI, aj as BenchmarkResult, ah as BenchmarkUserOptions, B as BuiltinEnvironment, C as CSSModuleScopeStrategy, a0 as Constructable, ag as CoverageC8Options, af as CoverageIstanbulOptions, ac as CoverageOptions, a9 as CoverageProvider, aa as CoverageProviderModule, ab as CoverageReporter, _ as DeepMerge, D as DoneCallback, a3 as Environment, E as EnvironmentOptions, a2 as EnvironmentReturn, a7 as ErrorWithDiff, a as File, n as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, Z as MergeInsertions, a1 as ModuleCache, M as ModuleGraphData, $ as MutableArray, Q as Nullable, a8 as OnServerRestartHandler, a6 as ParsedStack, a5 as Position, b as Reporter, K as ResolveIdFunction, R as ResolvedConfig, ad as ResolvedCoverageOptions, d as RunMode, r as RuntimeContext, u as SnapshotData, x as SnapshotMatchOptions, y as SnapshotResult, w as SnapshotStateOptions, G as SnapshotSummary, v as SnapshotUpdateState, S as Suite, m as SuiteAPI, p as SuiteCollector, q as SuiteFactory, o as SuiteHooks, i as Task, f as TaskBase, g as TaskResult, T as TaskResultPack, e as TaskState, h as Test, l as TestAPI, s as TestContext, j as TestFunction, k as TestOptions, z as UncheckedSnapshot, U as UserConfig, a4 as UserConsoleLog, t as Vitest, V as VitestEnvironment, c as VitestRunMode, W as WorkerContext, O as WorkerGlobalState, N as WorkerRPC } from './global-e98f203b.js';
|
|
5
5
|
import { TransformResult } from 'vite';
|
|
6
6
|
import * as chai from 'chai';
|
|
7
7
|
export { chai };
|
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { b as bench, c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.
|
|
2
|
-
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, h as getRunningMode, f as isFirstRun, j as isWatchMode, e as runOnce, v as vi, g as vitest, w as withCallback } from './chunk-runtime-hooks.
|
|
1
|
+
export { b as bench, c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.0ab05798.mjs';
|
|
2
|
+
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, h as getRunningMode, f as isFirstRun, j as isWatchMode, e as runOnce, v as vi, g as vitest, w as withCallback } from './chunk-runtime-hooks.e4219ed5.mjs';
|
|
3
3
|
import * as chai from 'chai';
|
|
4
4
|
export { chai };
|
|
5
5
|
export { assert, should } from 'chai';
|
|
6
6
|
import 'util';
|
|
7
|
-
import './chunk-mock-date.
|
|
7
|
+
import './chunk-mock-date.2917be60.mjs';
|
|
8
8
|
import 'path';
|
|
9
|
-
import './chunk-constants.
|
|
9
|
+
import './chunk-constants.71e8a211.mjs';
|
|
10
10
|
import 'tty';
|
|
11
11
|
import 'url';
|
|
12
12
|
import 'local-pkg';
|
|
13
13
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
14
|
-
import './chunk-runtime-rpc.
|
|
14
|
+
import './chunk-runtime-rpc.00a890d2.mjs';
|
|
15
15
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
16
16
|
import 'fs';
|
|
17
|
-
import './chunk-utils-source-map.
|
|
17
|
+
import './chunk-utils-source-map.2be5aa48.mjs';
|
|
18
18
|
import './spy.mjs';
|
|
19
19
|
import 'tinyspy';
|
package/dist/loader.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { pathToFileURL } from 'url';
|
|
2
2
|
import { readFile } from 'fs/promises';
|
|
3
|
-
import { i as isNodeBuiltin, d as normalizeModuleId, h as hasCJSSyntax } from './chunk-vite-node-utils.
|
|
4
|
-
import { g as getWorkerState } from './chunk-mock-date.
|
|
5
|
-
import './chunk-constants.
|
|
3
|
+
import { i as isNodeBuiltin, d as normalizeModuleId, h as hasCJSSyntax } from './chunk-vite-node-utils.473cd0b2.mjs';
|
|
4
|
+
import { g as getWorkerState } from './chunk-mock-date.2917be60.mjs';
|
|
5
|
+
import './chunk-constants.71e8a211.mjs';
|
|
6
6
|
import 'tty';
|
|
7
7
|
import 'path';
|
|
8
8
|
import 'module';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as VitestRunMode, U as UserConfig, t as Vitest, am as ModuleCacheMap, an as ViteNodeRunnerOptions, ao as MockMap, ap as ViteNodeRunner, aq as TestSequencer } from './global-
|
|
2
|
-
export { aq as TestSequencer, as as TestSequencerConstructor, t as Vitest, ar as startVitest } from './global-
|
|
1
|
+
import { c as VitestRunMode, U as UserConfig, t as Vitest, am as ModuleCacheMap, an as ViteNodeRunnerOptions, ao as MockMap, ap as ViteNodeRunner, aq as TestSequencer } from './global-e98f203b.js';
|
|
2
|
+
export { aq as TestSequencer, as as TestSequencerConstructor, t as Vitest, ar as startVitest } from './global-e98f203b.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import 'tinybench';
|
|
5
5
|
import 'fs';
|
package/dist/node.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.
|
|
2
|
-
export { V as VitestRunner } from './chunk-runtime-mocker.
|
|
3
|
-
import './chunk-constants.
|
|
1
|
+
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.8d8032d0.mjs';
|
|
2
|
+
export { V as VitestRunner } from './chunk-runtime-mocker.4bbb070f.mjs';
|
|
3
|
+
import './chunk-constants.71e8a211.mjs';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'url';
|
|
6
6
|
import 'path';
|
|
@@ -8,7 +8,7 @@ import './chunk-integrations-coverage.99c020eb.mjs';
|
|
|
8
8
|
import 'local-pkg';
|
|
9
9
|
import './chunk-env-node.ceb43f1c.mjs';
|
|
10
10
|
import 'console';
|
|
11
|
-
import './chunk-mock-date.
|
|
11
|
+
import './chunk-mock-date.2917be60.mjs';
|
|
12
12
|
import 'vite';
|
|
13
13
|
import 'process';
|
|
14
14
|
import 'fs';
|
|
@@ -17,20 +17,20 @@ import 'util';
|
|
|
17
17
|
import 'stream';
|
|
18
18
|
import 'events';
|
|
19
19
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
20
|
-
import './chunk-vite-node-client.
|
|
20
|
+
import './chunk-vite-node-client.da0a17ff.mjs';
|
|
21
21
|
import 'module';
|
|
22
22
|
import 'vm';
|
|
23
|
-
import './chunk-vite-node-utils.
|
|
23
|
+
import './chunk-vite-node-utils.473cd0b2.mjs';
|
|
24
24
|
import 'assert';
|
|
25
25
|
import 'debug';
|
|
26
26
|
import 'perf_hooks';
|
|
27
27
|
import 'worker_threads';
|
|
28
28
|
import 'tinypool';
|
|
29
|
-
import './chunk-utils-source-map.
|
|
29
|
+
import './chunk-utils-source-map.2be5aa48.mjs';
|
|
30
30
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
31
31
|
import 'crypto';
|
|
32
|
-
import './vendor-index.
|
|
33
|
-
import './vendor-index.
|
|
32
|
+
import './vendor-index.9d9196cc.mjs';
|
|
33
|
+
import './vendor-index.29636037.mjs';
|
|
34
34
|
import './chunk-magic-string.56b2b543.mjs';
|
|
35
35
|
import 'strip-literal';
|
|
36
36
|
import 'readline';
|
package/dist/suite.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import 'util';
|
|
2
|
-
import './chunk-mock-date.
|
|
3
|
-
export { b as bench, f as clearCollectorContext,
|
|
2
|
+
import './chunk-mock-date.2917be60.mjs';
|
|
3
|
+
export { b as bench, f as clearCollectorContext, p as createSuiteHooks, h as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.0ab05798.mjs';
|
|
4
4
|
import 'path';
|
|
5
|
-
import './chunk-constants.
|
|
5
|
+
import './chunk-constants.71e8a211.mjs';
|
|
6
6
|
import 'tty';
|
|
7
7
|
import 'url';
|
|
8
8
|
import 'local-pkg';
|
|
9
9
|
import 'chai';
|
|
10
10
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
11
|
-
import './chunk-runtime-rpc.
|
|
11
|
+
import './chunk-runtime-rpc.00a890d2.mjs';
|
|
12
12
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
13
13
|
import 'fs';
|
|
14
|
-
import './chunk-utils-source-map.
|
|
14
|
+
import './chunk-utils-source-map.2be5aa48.mjs';
|
|
15
15
|
import './spy.mjs';
|
|
16
16
|
import 'tinyspy';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,10 +2,10 @@ import { Buffer } from 'buffer';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import childProcess from 'child_process';
|
|
4
4
|
import process$1 from 'process';
|
|
5
|
-
import { m as mergeStream, g as getStream, c as crossSpawn } from './vendor-index.
|
|
5
|
+
import { m as mergeStream, g as getStream, c as crossSpawn } from './vendor-index.2ae8040a.mjs';
|
|
6
6
|
import url from 'url';
|
|
7
7
|
import require$$0, { constants } from 'os';
|
|
8
|
-
import { s as signalExit } from './vendor-index.
|
|
8
|
+
import { s as signalExit } from './vendor-index.29636037.mjs';
|
|
9
9
|
|
|
10
10
|
function stripFinalNewline(input) {
|
|
11
11
|
const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
|
package/dist/worker.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as resolve, c as distDir } from './chunk-constants.
|
|
2
|
-
import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-client.
|
|
1
|
+
import { a as resolve, c as distDir } from './chunk-constants.71e8a211.mjs';
|
|
2
|
+
import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-client.da0a17ff.mjs';
|
|
3
3
|
import { workerId } from 'tinypool';
|
|
4
|
-
import { g as getWorkerState } from './chunk-mock-date.
|
|
5
|
-
import { e as executeInViteNode } from './chunk-runtime-mocker.
|
|
6
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
4
|
+
import { g as getWorkerState } from './chunk-mock-date.2917be60.mjs';
|
|
5
|
+
import { e as executeInViteNode } from './chunk-runtime-mocker.4bbb070f.mjs';
|
|
6
|
+
import { r as rpc } from './chunk-runtime-rpc.00a890d2.mjs';
|
|
7
7
|
import 'tty';
|
|
8
8
|
import 'url';
|
|
9
9
|
import 'path';
|
|
10
10
|
import 'module';
|
|
11
11
|
import 'vm';
|
|
12
|
-
import './chunk-vite-node-utils.
|
|
12
|
+
import './chunk-vite-node-utils.473cd0b2.mjs';
|
|
13
13
|
import 'fs';
|
|
14
14
|
import 'assert';
|
|
15
15
|
import 'util';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.4",
|
|
4
4
|
"description": "A blazing fast unit test framework powered by Vite",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"chai": "^4.3.6",
|
|
98
98
|
"debug": "^4.3.4",
|
|
99
99
|
"local-pkg": "^0.4.2",
|
|
100
|
-
"strip-literal": "^0.4.
|
|
101
|
-
"tinybench": "^2.1.
|
|
102
|
-
"tinypool": "^0.
|
|
100
|
+
"strip-literal": "^0.4.1",
|
|
101
|
+
"tinybench": "^2.1.5",
|
|
102
|
+
"tinypool": "^0.3.0",
|
|
103
103
|
"tinyspy": "^1.0.2",
|
|
104
104
|
"vite": "^2.9.12 || ^3.0.0-0"
|
|
105
105
|
},
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@types/natural-compare": "^1.4.1",
|
|
114
114
|
"@types/prompts": "^2.4.0",
|
|
115
115
|
"@types/sinonjs__fake-timers": "^8.1.2",
|
|
116
|
-
"@vitest/ui": "0.23.
|
|
116
|
+
"@vitest/ui": "0.23.4",
|
|
117
117
|
"birpc": "^0.2.3",
|
|
118
118
|
"cac": "^6.7.14",
|
|
119
119
|
"chai-subset": "^1.6.0",
|
|
@@ -121,31 +121,31 @@
|
|
|
121
121
|
"diff": "^5.1.0",
|
|
122
122
|
"event-target-polyfill": "^0.0.3",
|
|
123
123
|
"execa": "^6.1.0",
|
|
124
|
-
"fast-glob": "^3.2.
|
|
124
|
+
"fast-glob": "^3.2.12",
|
|
125
125
|
"find-up": "^6.3.0",
|
|
126
126
|
"flatted": "^3.2.7",
|
|
127
127
|
"happy-dom": "^6.0.4",
|
|
128
128
|
"jsdom": "^20.0.0",
|
|
129
129
|
"log-update": "^5.0.1",
|
|
130
|
-
"magic-string": "^0.26.
|
|
130
|
+
"magic-string": "^0.26.3",
|
|
131
131
|
"micromatch": "^4.0.5",
|
|
132
132
|
"mlly": "^0.5.14",
|
|
133
133
|
"natural-compare": "^1.4.0",
|
|
134
134
|
"p-limit": "^4.0.0",
|
|
135
135
|
"pathe": "^0.2.0",
|
|
136
136
|
"picocolors": "^1.0.0",
|
|
137
|
-
"pkg-types": "^0.3.
|
|
137
|
+
"pkg-types": "^0.3.5",
|
|
138
138
|
"pretty-format": "^27.5.1",
|
|
139
139
|
"prompts": "^2.4.2",
|
|
140
|
-
"rollup": "^2.
|
|
140
|
+
"rollup": "^2.79.0",
|
|
141
141
|
"source-map-js": "^1.0.2",
|
|
142
142
|
"strip-ansi": "^7.0.1",
|
|
143
|
-
"typescript": "^4.8.
|
|
144
|
-
"vite-node": "0.23.
|
|
143
|
+
"typescript": "^4.8.3",
|
|
144
|
+
"vite-node": "0.23.4",
|
|
145
145
|
"ws": "^8.8.1"
|
|
146
146
|
},
|
|
147
147
|
"scripts": {
|
|
148
148
|
"build": "rimraf dist && rollup -c",
|
|
149
|
-
"dev": "NODE_OPTIONS=\"--max-old-space-size=8192\" rollup -c --watch -m inline"
|
|
149
|
+
"dev": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" rollup -c --watch -m inline"
|
|
150
150
|
}
|
|
151
151
|
}
|