vitest 0.26.1 → 0.26.2
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.js +10 -10
- package/dist/{chunk-api-setup.adeab271.js → chunk-api-setup.46ee0021.js} +2 -2
- package/dist/{chunk-install-pkg.6dd2bae6.js → chunk-install-pkg.31846bc1.js} +2 -2
- package/dist/{chunk-integrations-globals.96914902.js → chunk-integrations-globals.5af12e76.js} +7 -7
- package/dist/{chunk-node-git.a90c0582.js → chunk-node-git.43b341db.js} +3 -3
- package/dist/{chunk-runtime-chain.4cd984be.js → chunk-runtime-chain.198631fd.js} +6 -6
- package/dist/{chunk-runtime-error.f5c8aaf2.js → chunk-runtime-error.12631a44.js} +2 -2
- package/dist/{chunk-runtime-mocker.3fa602ba.js → chunk-runtime-mocker.03096876.js} +2 -2
- package/dist/{chunk-runtime-rpc.54d72169.js → chunk-runtime-rpc.503623e9.js} +2 -2
- package/dist/{chunk-runtime-setup.9cdedce6.js → chunk-runtime-setup.f79addc3.js} +14 -13
- package/dist/{chunk-snapshot-manager.e54d78b8.js → chunk-snapshot-manager.8c94a052.js} +32 -15
- package/dist/{chunk-typecheck-constants.06e1fe5b.js → chunk-typecheck-constants.e478eb98.js} +2 -2
- package/dist/{chunk-utils-env.3fdc1793.js → chunk-utils-env.4afc6329.js} +0 -0
- package/dist/{chunk-utils-import.afe2ffde.js → chunk-utils-import.dc87c88c.js} +41 -40
- package/dist/{chunk-utils-source-map.59ba6b0a.js → chunk-utils-source-map.95b8b3f0.js} +2 -2
- package/dist/{chunk-utils-timers.715da787.js → chunk-utils-timers.54caa12a.js} +1 -1
- package/dist/cli-wrapper.js +3 -3
- package/dist/cli.js +16 -10
- package/dist/config.d.ts +1 -1
- package/dist/entry.js +9 -9
- package/dist/environments.d.ts +1 -1
- package/dist/{index-1e9f7f83.d.ts → index-40ebba2b.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -8
- package/dist/loader.js +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +9 -9
- package/dist/suite.js +6 -6
- package/dist/{types-c41bae41.d.ts → types-2a26f28c.d.ts} +5 -0
- package/dist/{vendor-index.7a2cebfe.js → vendor-index.62932580.js} +0 -0
- package/dist/{vendor-index.9c919048.js → vendor-index.808a85a6.js} +0 -0
- package/dist/{vendor-index.b2fdde54.js → vendor-index.a323f2d0.js} +1 -1
- package/dist/worker.js +6 -6
- package/package.json +4 -4
package/dist/browser.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AssertType, E as EnhancedSpy, q as ExpectTypeOf, x as Mock, y as MockContext, w as MockInstance, z as Mocked, B as MockedClass, u as MockedFunction, v as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, r as assertType, h as beforeAll, k as beforeEach, n as createExpect, e as describe, m as expect, p as expectTypeOf, i as it, o as onTestFailed, d as suite, t as test } from './index-
|
|
2
|
-
import { b as ResolvedConfig } from './types-
|
|
3
|
-
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable, ap as BaseCoverageOptions, av as BenchFunction, at as Benchmark, aw as BenchmarkAPI, au as BenchmarkResult, as as BenchmarkUserOptions, B as BuiltinEnvironment, i as CSSModuleScopeStrategy, C as CollectLineNumbers, f as CollectLines, ab as Constructable, h as Context, ar as CoverageC8Options, aq as CoverageIstanbulOptions, an as CoverageOptions, ak as CoverageProvider, al as CoverageProviderModule, am as CoverageReporter, a9 as DeepMerge, D as DoneCallback, ae as Environment, E as EnvironmentOptions, ad as EnvironmentReturn, ai as ErrorWithDiff, a as File, x as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, a8 as MergeInsertions, ac as ModuleCache, M as ModuleGraphData, aa as MutableArray, a5 as Nullable, aj as OnServerRestartHandler, O as OnTestFailedHandler, ah as ParsedStack, ag as Position, d as RawErrsMap, c as Reporter, a0 as ResolveIdFunction, b as ResolvedConfig, ao as ResolvedCoverageOptions, g as RootAndTarget, l as RunMode, R as RuntimeConfig, K as RuntimeContext, S as SequenceHooks, P as SnapshotData, X as SnapshotMatchOptions, Y as SnapshotResult, W as SnapshotStateOptions, _ as SnapshotSummary, Q as SnapshotUpdateState, p as Suite, w as SuiteAPI, z as SuiteCollector, G as SuiteFactory, y as SuiteHooks, s as Task, n as TaskBase, o as TaskResult, T as TaskResultPack, m as TaskState, q as Test, v as TestAPI, L as TestContext, t as TestFunction, u as TestOptions, e as TscErrorInfo, r as TypeCheck, k as TypecheckConfig, Z as UncheckedSnapshot, U as UserConfig, af as UserConsoleLog, N as Vitest, V as VitestEnvironment, j as VitestRunMode, $ as WorkerContext, a3 as WorkerGlobalState, a2 as WorkerRPC } from './types-
|
|
1
|
+
export { A as AssertType, E as EnhancedSpy, q as ExpectTypeOf, x as Mock, y as MockContext, w as MockInstance, z as Mocked, B as MockedClass, u as MockedFunction, v as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, r as assertType, h as beforeAll, k as beforeEach, n as createExpect, e as describe, m as expect, p as expectTypeOf, i as it, o as onTestFailed, d as suite, t as test } from './index-40ebba2b.js';
|
|
2
|
+
import { b as ResolvedConfig } from './types-2a26f28c.js';
|
|
3
|
+
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable, ap as BaseCoverageOptions, av as BenchFunction, at as Benchmark, aw as BenchmarkAPI, au as BenchmarkResult, as as BenchmarkUserOptions, B as BuiltinEnvironment, i as CSSModuleScopeStrategy, C as CollectLineNumbers, f as CollectLines, ab as Constructable, h as Context, ar as CoverageC8Options, aq as CoverageIstanbulOptions, an as CoverageOptions, ak as CoverageProvider, al as CoverageProviderModule, am as CoverageReporter, a9 as DeepMerge, D as DoneCallback, ae as Environment, E as EnvironmentOptions, ad as EnvironmentReturn, ai as ErrorWithDiff, a as File, x as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, a8 as MergeInsertions, ac as ModuleCache, M as ModuleGraphData, aa as MutableArray, a5 as Nullable, aj as OnServerRestartHandler, O as OnTestFailedHandler, ah as ParsedStack, ag as Position, d as RawErrsMap, c as Reporter, a0 as ResolveIdFunction, b as ResolvedConfig, ao as ResolvedCoverageOptions, g as RootAndTarget, l as RunMode, R as RuntimeConfig, K as RuntimeContext, S as SequenceHooks, P as SnapshotData, X as SnapshotMatchOptions, Y as SnapshotResult, W as SnapshotStateOptions, _ as SnapshotSummary, Q as SnapshotUpdateState, p as Suite, w as SuiteAPI, z as SuiteCollector, G as SuiteFactory, y as SuiteHooks, s as Task, n as TaskBase, o as TaskResult, T as TaskResultPack, m as TaskState, q as Test, v as TestAPI, L as TestContext, t as TestFunction, u as TestOptions, e as TscErrorInfo, r as TypeCheck, k as TypecheckConfig, Z as UncheckedSnapshot, U as UserConfig, af as UserConsoleLog, N as Vitest, V as VitestEnvironment, j as VitestRunMode, $ as WorkerContext, a3 as WorkerGlobalState, a2 as WorkerRPC } from './types-2a26f28c.js';
|
|
4
4
|
import * as chai from 'chai';
|
|
5
5
|
export { chai };
|
|
6
6
|
export { assert, should } from 'chai';
|
package/dist/browser.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export { c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.
|
|
2
|
-
import { e as dist } from './chunk-utils-import.
|
|
3
|
-
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, o as onTestFailed } from './chunk-utils-import.
|
|
4
|
-
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-setup.
|
|
1
|
+
export { c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.198631fd.js';
|
|
2
|
+
import { e as dist } from './chunk-utils-import.dc87c88c.js';
|
|
3
|
+
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, o as onTestFailed } from './chunk-utils-import.dc87c88c.js';
|
|
4
|
+
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-setup.f79addc3.js';
|
|
5
5
|
import * as chai from 'chai';
|
|
6
6
|
export { chai };
|
|
7
7
|
export { assert, should } from 'chai';
|
|
8
8
|
import 'util';
|
|
9
|
-
import './chunk-typecheck-constants.
|
|
9
|
+
import './chunk-typecheck-constants.e478eb98.js';
|
|
10
10
|
import 'node:path';
|
|
11
|
-
import './chunk-utils-env.
|
|
11
|
+
import './chunk-utils-env.4afc6329.js';
|
|
12
12
|
import 'tty';
|
|
13
13
|
import 'node:url';
|
|
14
14
|
import 'path';
|
|
15
15
|
import 'local-pkg';
|
|
16
16
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
17
|
-
import './chunk-runtime-rpc.
|
|
18
|
-
import './chunk-utils-timers.
|
|
17
|
+
import './chunk-runtime-rpc.503623e9.js';
|
|
18
|
+
import './chunk-utils-timers.54caa12a.js';
|
|
19
19
|
import 'node:fs';
|
|
20
|
-
import './chunk-utils-source-map.
|
|
20
|
+
import './chunk-utils-source-map.95b8b3f0.js';
|
|
21
21
|
import 'fs';
|
|
22
22
|
import './spy.js';
|
|
23
23
|
import 'tinyspy';
|
|
24
24
|
import 'perf_hooks';
|
|
25
25
|
import './chunk-integrations-coverage.befed097.js';
|
|
26
|
-
import './chunk-runtime-error.
|
|
26
|
+
import './chunk-runtime-error.12631a44.js';
|
|
27
27
|
import 'vite-node/source-map';
|
|
28
28
|
import './chunk-env-node.b3664da2.js';
|
|
29
29
|
import 'node:console';
|
|
@@ -9,8 +9,8 @@ import require$$2 from 'events';
|
|
|
9
9
|
import require$$1 from 'https';
|
|
10
10
|
import require$$2$1 from 'http';
|
|
11
11
|
import require$$7 from 'url';
|
|
12
|
-
import { A as API_PATH } from './chunk-utils-env.
|
|
13
|
-
import './chunk-typecheck-constants.
|
|
12
|
+
import { A as API_PATH } from './chunk-utils-env.4afc6329.js';
|
|
13
|
+
import './chunk-typecheck-constants.e478eb98.js';
|
|
14
14
|
import 'tty';
|
|
15
15
|
import 'node:url';
|
|
16
16
|
import 'path';
|
|
@@ -2,8 +2,8 @@ import require$$0 from 'fs';
|
|
|
2
2
|
import g from 'path';
|
|
3
3
|
import util from 'util';
|
|
4
4
|
import require$$0$2 from 'child_process';
|
|
5
|
-
import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1 } from './vendor-index.
|
|
6
|
-
import { o as onetime$1 } from './vendor-index.
|
|
5
|
+
import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1 } from './vendor-index.62932580.js';
|
|
6
|
+
import { o as onetime$1 } from './vendor-index.808a85a6.js';
|
|
7
7
|
import require$$0$1 from 'os';
|
|
8
8
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
9
9
|
import 'assert';
|
package/dist/{chunk-integrations-globals.96914902.js → chunk-integrations-globals.5af12e76.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { m as globalApis } from './chunk-utils-env.
|
|
2
|
-
import { i as index } from './chunk-utils-import.
|
|
1
|
+
import { m as globalApis } from './chunk-utils-env.4afc6329.js';
|
|
2
|
+
import { i as index } from './chunk-utils-import.dc87c88c.js';
|
|
3
3
|
import 'tty';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'path';
|
|
6
|
-
import './chunk-runtime-chain.
|
|
6
|
+
import './chunk-runtime-chain.198631fd.js';
|
|
7
7
|
import 'util';
|
|
8
8
|
import 'chai';
|
|
9
|
-
import './chunk-typecheck-constants.
|
|
9
|
+
import './chunk-typecheck-constants.e478eb98.js';
|
|
10
10
|
import 'node:path';
|
|
11
11
|
import 'local-pkg';
|
|
12
12
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
13
|
-
import './chunk-runtime-rpc.
|
|
14
|
-
import './chunk-utils-timers.
|
|
13
|
+
import './chunk-runtime-rpc.503623e9.js';
|
|
14
|
+
import './chunk-utils-timers.54caa12a.js';
|
|
15
15
|
import 'node:fs';
|
|
16
|
-
import './chunk-utils-source-map.
|
|
16
|
+
import './chunk-utils-source-map.95b8b3f0.js';
|
|
17
17
|
import 'fs';
|
|
18
18
|
import './spy.js';
|
|
19
19
|
import 'tinyspy';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as resolve } from './chunk-utils-env.
|
|
2
|
-
import { e as execa } from './vendor-index.
|
|
1
|
+
import { b as resolve } from './chunk-utils-env.4afc6329.js';
|
|
2
|
+
import { e as execa } from './vendor-index.a323f2d0.js';
|
|
3
3
|
import 'tty';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'path';
|
|
@@ -7,7 +7,7 @@ import 'node:buffer';
|
|
|
7
7
|
import 'node:path';
|
|
8
8
|
import 'node:child_process';
|
|
9
9
|
import 'node:process';
|
|
10
|
-
import './vendor-index.
|
|
10
|
+
import './vendor-index.62932580.js';
|
|
11
11
|
import 'child_process';
|
|
12
12
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
13
13
|
import 'fs';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import util$1 from 'util';
|
|
2
2
|
import * as chai$2 from 'chai';
|
|
3
3
|
import { expect, AssertionError, util } from 'chai';
|
|
4
|
-
import { i as isObject, b as getCallLastIndex, s as slash, g as getWorkerState, c as getNames, d as assertTypes, e as getCurrentEnvironment, f as getFullName, o as objectAttr, n as noop, h as isRunningInTest, j as isRunningInBenchmark } from './chunk-typecheck-constants.
|
|
4
|
+
import { i as isObject, b as getCallLastIndex, s as slash, g as getWorkerState, c as getNames, d as assertTypes, e as getCurrentEnvironment, f as getFullName, o as objectAttr, n as noop, h as isRunningInTest, j as isRunningInBenchmark } from './chunk-typecheck-constants.e478eb98.js';
|
|
5
5
|
import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
|
|
6
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
6
|
+
import { r as rpc } from './chunk-runtime-rpc.503623e9.js';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
|
-
import { j as join, d as dirname, p as picocolors } from './chunk-utils-env.
|
|
9
|
-
import { p as plugins_1, f as format_1, u as unifiedDiff, a as stringify, m as matcherUtils, s as safeSetTimeout, b as safeClearTimeout } from './chunk-utils-timers.
|
|
10
|
-
import { a as posToNumber, n as numberToPos, l as lineSplitRE, p as parseStacktrace } from './chunk-utils-source-map.
|
|
8
|
+
import { j as join, d as dirname, p as picocolors } from './chunk-utils-env.4afc6329.js';
|
|
9
|
+
import { p as plugins_1, f as format_1, u as unifiedDiff, a as stringify, m as matcherUtils, s as safeSetTimeout, b as safeClearTimeout } from './chunk-utils-timers.54caa12a.js';
|
|
10
|
+
import { a as posToNumber, n as numberToPos, l as lineSplitRE, p as parseStacktrace } from './chunk-utils-source-map.95b8b3f0.js';
|
|
11
11
|
import { promises } from 'fs';
|
|
12
12
|
import { isMockFunction } from './spy.js';
|
|
13
13
|
|
|
@@ -2192,7 +2192,7 @@ function createTestContext(test) {
|
|
|
2192
2192
|
}
|
|
2193
2193
|
function makeTimeoutMsg(isHook, timeout) {
|
|
2194
2194
|
return `${isHook ? "Hook" : "Test"} timed out in ${timeout}ms.
|
|
2195
|
-
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "${isHook ? "hookTimeout" : "testTimeout"}".`;
|
|
2195
|
+
If this is a long-running ${isHook ? "hook" : "test"}, pass a timeout value as the last argument or configure it globally with "${isHook ? "hookTimeout" : "testTimeout"}".`;
|
|
2196
2196
|
}
|
|
2197
2197
|
|
|
2198
2198
|
const fnMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import util$1 from 'util';
|
|
2
2
|
import { util } from 'chai';
|
|
3
|
-
import { a as stringify } from './chunk-utils-timers.
|
|
4
|
-
import { x as deepClone, g as getWorkerState, y as getType } from './chunk-typecheck-constants.
|
|
3
|
+
import { a as stringify } from './chunk-utils-timers.54caa12a.js';
|
|
4
|
+
import { x as deepClone, g as getWorkerState, y as getType } from './chunk-typecheck-constants.e478eb98.js';
|
|
5
5
|
|
|
6
6
|
const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
7
7
|
const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
@@ -2,9 +2,9 @@ import { ViteNodeRunner } from 'vite-node/client';
|
|
|
2
2
|
import { isInternalRequest } from 'vite-node/utils';
|
|
3
3
|
import { normalizePath } from 'vite';
|
|
4
4
|
import { i as isNodeBuiltin } from './vendor-index.2e96c50b.js';
|
|
5
|
-
import { g as getWorkerState, y as getType, K as getAllMockableProperties, e as getCurrentEnvironment } from './chunk-typecheck-constants.
|
|
5
|
+
import { g as getWorkerState, y as getType, K as getAllMockableProperties, e as getCurrentEnvironment } from './chunk-typecheck-constants.e478eb98.js';
|
|
6
6
|
import { existsSync, readdirSync } from 'node:fs';
|
|
7
|
-
import { b as resolve, e as distDir, g as isAbsolute, p as picocolors, d as dirname, j as join, c as basename, l as extname } from './chunk-utils-env.
|
|
7
|
+
import { b as resolve, e as distDir, g as isAbsolute, p as picocolors, d as dirname, j as join, c as basename, l as extname } from './chunk-utils-env.4afc6329.js';
|
|
8
8
|
|
|
9
9
|
class RefTracker {
|
|
10
10
|
constructor() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getWorkerState } from './chunk-typecheck-constants.
|
|
2
|
-
import { s as safeSetTimeout } from './chunk-utils-timers.
|
|
1
|
+
import { g as getWorkerState } from './chunk-typecheck-constants.e478eb98.js';
|
|
2
|
+
import { s as safeSetTimeout } from './chunk-utils-timers.54caa12a.js';
|
|
3
3
|
|
|
4
4
|
const safeRandom = Math.random;
|
|
5
5
|
function withSafeTimers(fn) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { performance } from 'perf_hooks';
|
|
2
2
|
import { s as someTasksAreOnly, i as interpretTaskModes, t as takeCoverageInsideWorker, p as pLimit } from './chunk-integrations-coverage.befed097.js';
|
|
3
|
-
import { r as resetRunOnceCounter, i as index, v as vi, s as setCurrentTest } from './chunk-utils-import.
|
|
4
|
-
import { g as getWorkerState, R as RealDate, t as toArray, l as relativePath, j as isRunningInBenchmark, p as partitionSuiteChildren, q as shuffle, u as hasTests, v as hasFailed, w as createDefer, f as getFullName } from './chunk-typecheck-constants.
|
|
5
|
-
import { f as clearCollectorContext, h as defaultSuite, j as setHooks, k as getHooks, l as collectorContext, m as getBenchOptions, n as getFn, o as setState, G as GLOBAL_EXPECT, p as getState } from './chunk-runtime-chain.
|
|
6
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
7
|
-
import { p as processError } from './chunk-runtime-error.
|
|
3
|
+
import { r as resetRunOnceCounter, i as index, v as vi, s as setCurrentTest } from './chunk-utils-import.dc87c88c.js';
|
|
4
|
+
import { g as getWorkerState, R as RealDate, t as toArray, l as relativePath, j as isRunningInBenchmark, p as partitionSuiteChildren, q as shuffle, u as hasTests, v as hasFailed, w as createDefer, f as getFullName } from './chunk-typecheck-constants.e478eb98.js';
|
|
5
|
+
import { f as clearCollectorContext, h as defaultSuite, j as setHooks, k as getHooks, l as collectorContext, m as getBenchOptions, n as getFn, o as setState, G as GLOBAL_EXPECT, p as getState } from './chunk-runtime-chain.198631fd.js';
|
|
6
|
+
import { r as rpc } from './chunk-runtime-rpc.503623e9.js';
|
|
7
|
+
import { p as processError } from './chunk-runtime-error.12631a44.js';
|
|
8
8
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
9
9
|
import { e as environments } from './chunk-env-node.b3664da2.js';
|
|
10
|
-
import { i as isNode, a as isBrowser } from './chunk-utils-env.
|
|
11
|
-
import { b as safeClearTimeout, s as safeSetTimeout } from './chunk-utils-timers.
|
|
10
|
+
import { i as isNode, a as isBrowser } from './chunk-utils-env.4afc6329.js';
|
|
11
|
+
import { b as safeClearTimeout, s as safeSetTimeout } from './chunk-utils-timers.54caa12a.js';
|
|
12
12
|
|
|
13
13
|
let globalSetup = false;
|
|
14
14
|
async function setupGlobalEnv(config) {
|
|
@@ -29,7 +29,7 @@ async function setupGlobalEnv(config) {
|
|
|
29
29
|
await setupConsoleLogSpy();
|
|
30
30
|
}
|
|
31
31
|
if (config.globals)
|
|
32
|
-
(await import('./chunk-integrations-globals.
|
|
32
|
+
(await import('./chunk-integrations-globals.5af12e76.js')).registerApiGlobally();
|
|
33
33
|
}
|
|
34
34
|
function setupDefines(defines) {
|
|
35
35
|
for (const key in defines)
|
|
@@ -200,7 +200,8 @@ async function collectTests(paths, config) {
|
|
|
200
200
|
type: "suite",
|
|
201
201
|
mode: "run",
|
|
202
202
|
filepath,
|
|
203
|
-
tasks: []
|
|
203
|
+
tasks: [],
|
|
204
|
+
projectName: config.name
|
|
204
205
|
};
|
|
205
206
|
clearCollectorContext();
|
|
206
207
|
try {
|
|
@@ -329,7 +330,7 @@ const callCleanupHooks = async (cleanups) => {
|
|
|
329
330
|
async function runTest(test) {
|
|
330
331
|
var _a, _b, _c;
|
|
331
332
|
if (test.mode !== "run") {
|
|
332
|
-
const { getSnapshotClient } = await import('./chunk-runtime-chain.
|
|
333
|
+
const { getSnapshotClient } = await import('./chunk-runtime-chain.198631fd.js').then(function (n) { return n.r; });
|
|
333
334
|
getSnapshotClient().skipTestSnapshots(test);
|
|
334
335
|
return;
|
|
335
336
|
}
|
|
@@ -346,7 +347,7 @@ async function runTest(test) {
|
|
|
346
347
|
clearModuleMocks();
|
|
347
348
|
setCurrentTest(test);
|
|
348
349
|
if (isNode) {
|
|
349
|
-
const { getSnapshotClient } = await import('./chunk-runtime-chain.
|
|
350
|
+
const { getSnapshotClient } = await import('./chunk-runtime-chain.198631fd.js').then(function (n) { return n.r; });
|
|
350
351
|
await getSnapshotClient().setTest(test);
|
|
351
352
|
}
|
|
352
353
|
const workerState = getWorkerState();
|
|
@@ -409,7 +410,7 @@ async function runTest(test) {
|
|
|
409
410
|
console.error(test.result.error.message, test.result.error.stackStr);
|
|
410
411
|
setCurrentTest(void 0);
|
|
411
412
|
if (isNode) {
|
|
412
|
-
const { getSnapshotClient } = await import('./chunk-runtime-chain.
|
|
413
|
+
const { getSnapshotClient } = await import('./chunk-runtime-chain.198631fd.js').then(function (n) { return n.r; });
|
|
413
414
|
getSnapshotClient().clearTest();
|
|
414
415
|
}
|
|
415
416
|
test.result.duration = now() - start;
|
|
@@ -615,7 +616,7 @@ async function startTestsBrowser(paths, config) {
|
|
|
615
616
|
async function startTestsNode(paths, config) {
|
|
616
617
|
const files = await collectTests(paths, config);
|
|
617
618
|
rpc().onCollected(files);
|
|
618
|
-
const { getSnapshotClient } = await import('./chunk-runtime-chain.
|
|
619
|
+
const { getSnapshotClient } = await import('./chunk-runtime-chain.198631fd.js').then(function (n) { return n.r; });
|
|
619
620
|
getSnapshotClient().clear();
|
|
620
621
|
await runFiles(files, config);
|
|
621
622
|
const coverage = await takeCoverageInsideWorker(config.coverage);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as join, c as basename, d as dirname, r as relative, b as resolve, e as distDir, f as rootDir, p as picocolors, g as isAbsolute, i as isNode, h as configFiles, k as defaultPort, n as normalize, t as toNamespacedPath, E as EXIT_CODE_RESTART } from './chunk-utils-env.
|
|
1
|
+
import { j as join, c as basename, d as dirname, r as relative, b as resolve, e as distDir, f as rootDir, p as picocolors, g as isAbsolute, i as isNode, h as configFiles, k as defaultPort, n as normalize, t as toNamespacedPath, E as EXIT_CODE_RESTART } from './chunk-utils-env.4afc6329.js';
|
|
2
2
|
import { p as pLimit, s as someTasksAreOnly, i as interpretTaskModes, g as getCoverageProvider, C as CoverageProviderMap } from './chunk-integrations-coverage.befed097.js';
|
|
3
3
|
import { g as getEnvPackageName } from './chunk-env-node.b3664da2.js';
|
|
4
|
-
import { T as TYPECHECK_SUITE, z as ensurePackageInstalled, A as AggregateErrorPonyfill, s as slash$1, l as relativePath, B as getTests, f as getFullName, v as hasFailed, C as hasFailedSnapshot, D as getTypecheckTests, E as getSuites, F as isTypecheckTest, k as notNullish, q as shuffle, t as toArray, n as noop$1, G as deepMerge, b as getCallLastIndex, H as removeUndefinedValues, I as isWindows, J as stdout } from './chunk-typecheck-constants.
|
|
4
|
+
import { T as TYPECHECK_SUITE, z as ensurePackageInstalled, A as AggregateErrorPonyfill, s as slash$1, l as relativePath, B as getTests, f as getFullName, v as hasFailed, C as hasFailedSnapshot, D as getTypecheckTests, E as getSuites, F as isTypecheckTest, k as notNullish, q as shuffle, t as toArray, n as noop$1, G as deepMerge, b as getCallLastIndex, H as removeUndefinedValues, I as isWindows, J as stdout } from './chunk-typecheck-constants.e478eb98.js';
|
|
5
5
|
import { loadConfigFromFile, normalizePath, createServer, mergeConfig } from 'vite';
|
|
6
6
|
import path$a from 'node:path';
|
|
7
7
|
import url, { fileURLToPath } from 'node:url';
|
|
@@ -17,7 +17,7 @@ import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
|
|
|
17
17
|
import { ViteNodeRunner } from 'vite-node/client';
|
|
18
18
|
import { ViteNodeServer } from 'vite-node/server';
|
|
19
19
|
import { writeFile, rm } from 'node:fs/promises';
|
|
20
|
-
import { e as execa } from './vendor-index.
|
|
20
|
+
import { e as execa } from './vendor-index.a323f2d0.js';
|
|
21
21
|
import { SourceMapConsumer } from 'source-map';
|
|
22
22
|
import H from 'module';
|
|
23
23
|
import { parse as parse$4 } from 'acorn';
|
|
@@ -27,20 +27,20 @@ import { cpus, hostname } from 'node:os';
|
|
|
27
27
|
import { Tinypool } from 'tinypool';
|
|
28
28
|
import { c as createBirpc } from './vendor-index.783e7f3e.js';
|
|
29
29
|
import { performance } from 'perf_hooks';
|
|
30
|
-
import { c as stripAnsi, d as safeSetInterval, e as safeClearInterval, g as cliTruncate, s as safeSetTimeout, h as stringWidth, i as ansiStyles, j as sliceAnsi, a as stringify$5, u as unifiedDiff, b as safeClearTimeout } from './chunk-utils-timers.
|
|
31
|
-
import { p as parseStacktrace, a as posToNumber, l as lineSplitRE } from './chunk-utils-source-map.
|
|
30
|
+
import { c as stripAnsi, d as safeSetInterval, e as safeClearInterval, g as cliTruncate, s as safeSetTimeout, h as stringWidth, i as ansiStyles, j as sliceAnsi, a as stringify$5, u as unifiedDiff, b as safeClearTimeout } from './chunk-utils-timers.54caa12a.js';
|
|
31
|
+
import { p as parseStacktrace, a as posToNumber, l as lineSplitRE } from './chunk-utils-source-map.95b8b3f0.js';
|
|
32
32
|
import { resolveModule } from 'local-pkg';
|
|
33
33
|
import { createHash } from 'crypto';
|
|
34
34
|
import { slash as slash$2 } from 'vite-node/utils';
|
|
35
|
-
import { o as onetime } from './vendor-index.
|
|
36
|
-
import { s as signalExit } from './vendor-index.
|
|
35
|
+
import { o as onetime } from './vendor-index.808a85a6.js';
|
|
36
|
+
import { s as signalExit } from './vendor-index.62932580.js';
|
|
37
37
|
import { createHash as createHash$1 } from 'node:crypto';
|
|
38
38
|
import MagicString from './chunk-magic-string.3a794426.js';
|
|
39
39
|
import { stripLiteral } from 'strip-literal';
|
|
40
40
|
import require$$0$3 from 'readline';
|
|
41
41
|
import { p as prompts } from './vendor-index.9f20a9be.js';
|
|
42
42
|
|
|
43
|
-
var version$1 = "0.26.
|
|
43
|
+
var version$1 = "0.26.2";
|
|
44
44
|
|
|
45
45
|
class EndError extends Error {
|
|
46
46
|
constructor(value) {
|
|
@@ -7565,6 +7565,19 @@ function elegantSpinner() {
|
|
|
7565
7565
|
function formatTimeString(date) {
|
|
7566
7566
|
return date.toTimeString().split(" ")[0];
|
|
7567
7567
|
}
|
|
7568
|
+
function formatProjectName(name, suffix = " ") {
|
|
7569
|
+
if (!name)
|
|
7570
|
+
return "";
|
|
7571
|
+
const index = name.split("").reduce((acc, v, idx) => acc + v.charCodeAt(0) + idx, 0);
|
|
7572
|
+
const colors = [
|
|
7573
|
+
picocolors.exports.blue,
|
|
7574
|
+
picocolors.exports.yellow,
|
|
7575
|
+
picocolors.exports.cyan,
|
|
7576
|
+
picocolors.exports.green,
|
|
7577
|
+
picocolors.exports.magenta
|
|
7578
|
+
];
|
|
7579
|
+
return colors[index % colors.length](`|${name}|`) + suffix;
|
|
7580
|
+
}
|
|
7568
7581
|
|
|
7569
7582
|
var _a;
|
|
7570
7583
|
const BADGE_PADDING = " ";
|
|
@@ -7835,7 +7848,7 @@ ${picocolors.exports.cyan(picocolors.exports.inverse(picocolors.exports.bold(" B
|
|
|
7835
7848
|
}
|
|
7836
7849
|
}
|
|
7837
7850
|
async printTaskErrors(tasks, errorDivider) {
|
|
7838
|
-
var _a2;
|
|
7851
|
+
var _a2, _b;
|
|
7839
7852
|
const errorsQueue = [];
|
|
7840
7853
|
for (const task of tasks) {
|
|
7841
7854
|
const error = (_a2 = task.result) == null ? void 0 : _a2.error;
|
|
@@ -7851,10 +7864,11 @@ ${picocolors.exports.cyan(picocolors.exports.inverse(picocolors.exports.bold(" B
|
|
|
7851
7864
|
for (const [error, tasks2] of errorsQueue) {
|
|
7852
7865
|
for (const task of tasks2) {
|
|
7853
7866
|
const filepath = (task == null ? void 0 : task.filepath) || "";
|
|
7867
|
+
const projectName = (task == null ? void 0 : task.projectName) || ((_b = task.file) == null ? void 0 : _b.projectName);
|
|
7854
7868
|
let name = getFullName(task);
|
|
7855
7869
|
if (filepath)
|
|
7856
7870
|
name = `${name} ${picocolors.exports.dim(`[ ${this.relative(filepath)} ]`)}`;
|
|
7857
|
-
this.ctx.logger.error(`${picocolors.exports.red(picocolors.exports.bold(picocolors.exports.inverse(" FAIL ")))} ${name}`);
|
|
7871
|
+
this.ctx.logger.error(`${picocolors.exports.red(picocolors.exports.bold(picocolors.exports.inverse(" FAIL ")))} ${formatProjectName(projectName)}${name}`);
|
|
7858
7872
|
}
|
|
7859
7873
|
await this.ctx.logger.printError(error);
|
|
7860
7874
|
errorDivider();
|
|
@@ -7932,7 +7946,9 @@ function renderTree$1(tasks, options, level = 0) {
|
|
|
7932
7946
|
let output = [];
|
|
7933
7947
|
for (const task of tasks) {
|
|
7934
7948
|
let suffix = "";
|
|
7935
|
-
|
|
7949
|
+
let prefix = ` ${getStateSymbol(task)} `;
|
|
7950
|
+
if (level === 0 && task.type === "suite" && task.projectName)
|
|
7951
|
+
prefix += formatProjectName(task.projectName);
|
|
7936
7952
|
if (task.type === "test" && ((_a = task.result) == null ? void 0 : _a.retryCount) && task.result.retryCount > 1)
|
|
7937
7953
|
suffix += picocolors.exports.yellow(` (retry x${task.result.retryCount})`);
|
|
7938
7954
|
if (task.type === "suite" && !isTypecheckTest(task)) {
|
|
@@ -9925,7 +9941,7 @@ createLogUpdate(process$1.stdout);
|
|
|
9925
9941
|
|
|
9926
9942
|
createLogUpdate(process$1.stderr);
|
|
9927
9943
|
|
|
9928
|
-
var version = "0.26.
|
|
9944
|
+
var version = "0.26.2";
|
|
9929
9945
|
|
|
9930
9946
|
function fileFromParsedStack(stack) {
|
|
9931
9947
|
var _a, _b;
|
|
@@ -9978,7 +9994,8 @@ async function printError(error, ctx, options = {}) {
|
|
|
9978
9994
|
if (e.showDiff || e.showDiff === void 0 && e.actual && e.expected) {
|
|
9979
9995
|
displayDiff(stringify$5(e.actual), stringify$5(e.expected), ctx.logger.console, {
|
|
9980
9996
|
outputTruncateLength: ctx.config.outputTruncateLength,
|
|
9981
|
-
outputDiffLines: ctx.config.outputDiffLines
|
|
9997
|
+
outputDiffLines: ctx.config.outputDiffLines,
|
|
9998
|
+
outputDiffMaxLines: ctx.config.outputDiffMaxLines
|
|
9982
9999
|
});
|
|
9983
10000
|
}
|
|
9984
10001
|
}
|
|
@@ -10425,7 +10442,7 @@ class Vitest {
|
|
|
10425
10442
|
}
|
|
10426
10443
|
async filterTestsBySource(tests) {
|
|
10427
10444
|
if (this.config.changed && !this.config.related) {
|
|
10428
|
-
const { VitestGit } = await import('./chunk-node-git.
|
|
10445
|
+
const { VitestGit } = await import('./chunk-node-git.43b341db.js');
|
|
10429
10446
|
const vitestGit = new VitestGit(this.config.root);
|
|
10430
10447
|
const related2 = await vitestGit.findChangedFiles({
|
|
10431
10448
|
changedSince: this.config.changed
|
|
@@ -11116,7 +11133,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
|
|
|
11116
11133
|
try {
|
|
11117
11134
|
await ctx.setServer(options, server);
|
|
11118
11135
|
if (options.api && options.watch)
|
|
11119
|
-
(await import('./chunk-api-setup.
|
|
11136
|
+
(await import('./chunk-api-setup.46ee0021.js')).setup(ctx);
|
|
11120
11137
|
} catch (err) {
|
|
11121
11138
|
ctx.logger.printError(err, true);
|
|
11122
11139
|
process.exit(1);
|
package/dist/{chunk-typecheck-constants.06e1fe5b.js → chunk-typecheck-constants.e478eb98.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { relative } from 'node:path';
|
|
2
|
-
import { i as isNode, a as isBrowser, r as relative$1, p as picocolors, E as EXIT_CODE_RESTART } from './chunk-utils-env.
|
|
2
|
+
import { i as isNode, a as isBrowser, r as relative$1, p as picocolors, E as EXIT_CODE_RESTART } from './chunk-utils-env.4afc6329.js';
|
|
3
3
|
import { isPackageExists } from 'local-pkg';
|
|
4
4
|
|
|
5
5
|
const TYPECHECK_SUITE = Symbol("vitest:typecheck-suite");
|
|
@@ -290,7 +290,7 @@ async function ensurePackageInstalled(dependency, root) {
|
|
|
290
290
|
message: picocolors.exports.reset(`Do you want to install ${picocolors.exports.green(dependency)}?`)
|
|
291
291
|
});
|
|
292
292
|
if (install) {
|
|
293
|
-
await (await import('./chunk-install-pkg.
|
|
293
|
+
await (await import('./chunk-install-pkg.31846bc1.js')).installPackage(dependency, { dev: true });
|
|
294
294
|
process.stderr.write(picocolors.exports.yellow(`
|
|
295
295
|
Package ${dependency} installed, re-run the command to start.
|
|
296
296
|
`));
|
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, s as suite, t as test, d as describe, i as it, b as bench, c as createExpect, e as globalExpect } from './chunk-runtime-chain.
|
|
2
|
-
import { g as getWorkerState, R as RealDate, r as resetDate, m as mockDate, a as resetModules } from './chunk-typecheck-constants.
|
|
3
|
-
import { p as parseStacktrace } from './chunk-utils-source-map.
|
|
1
|
+
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, s as suite, t as test, d as describe, i as it, b as bench, c as createExpect, e as globalExpect } from './chunk-runtime-chain.198631fd.js';
|
|
2
|
+
import { g as getWorkerState, R as RealDate, r as resetDate, m as mockDate, a as resetModules } from './chunk-typecheck-constants.e478eb98.js';
|
|
3
|
+
import { p as parseStacktrace } from './chunk-utils-source-map.95b8b3f0.js';
|
|
4
4
|
import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
|
|
5
5
|
import util from 'util';
|
|
6
6
|
import { spyOn, fn, isMockFunction, spies } from './spy.js';
|
|
7
|
-
import { s as safeSetTimeout } from './chunk-utils-timers.
|
|
7
|
+
import { s as safeSetTimeout } from './chunk-utils-timers.54caa12a.js';
|
|
8
8
|
import * as chai from 'chai';
|
|
9
9
|
import { assert, should } from 'chai';
|
|
10
10
|
|
|
@@ -1298,7 +1298,6 @@ function withGlobal(_global) {
|
|
|
1298
1298
|
* @param {number} minute
|
|
1299
1299
|
* @param {number} second
|
|
1300
1300
|
* @param {number} ms
|
|
1301
|
-
*
|
|
1302
1301
|
* @returns {Date}
|
|
1303
1302
|
*/
|
|
1304
1303
|
function ClockDate(year, month, date, hour, minute, second, ms) {
|
|
@@ -1524,7 +1523,6 @@ function withGlobal(_global) {
|
|
|
1524
1523
|
* @param {Clock} clock
|
|
1525
1524
|
* @param {number} from
|
|
1526
1525
|
* @param {number} to
|
|
1527
|
-
*
|
|
1528
1526
|
* @returns {Timer}
|
|
1529
1527
|
*/
|
|
1530
1528
|
function firstTimerInRange(clock, from, to) {
|
|
@@ -1955,6 +1953,12 @@ function withGlobal(_global) {
|
|
|
1955
1953
|
return [secsSinceStart, remainderInNanos];
|
|
1956
1954
|
}
|
|
1957
1955
|
|
|
1956
|
+
function fakePerformanceNow() {
|
|
1957
|
+
const hrt = hrtime();
|
|
1958
|
+
const millis = hrt[0] * 1000 + hrt[1] / 1e6;
|
|
1959
|
+
return millis;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1958
1962
|
if (hrtimeBigintPresent) {
|
|
1959
1963
|
hrtime.bigint = function () {
|
|
1960
1964
|
const parts = hrtime();
|
|
@@ -1997,19 +2001,18 @@ function withGlobal(_global) {
|
|
|
1997
2001
|
});
|
|
1998
2002
|
};
|
|
1999
2003
|
if (typeof _global.Promise !== "undefined" && utilPromisify) {
|
|
2000
|
-
clock.setTimeout[
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2004
|
+
clock.setTimeout[utilPromisify.custom] =
|
|
2005
|
+
function promisifiedSetTimeout(timeout, arg) {
|
|
2006
|
+
return new _global.Promise(function setTimeoutExecutor(
|
|
2007
|
+
resolve
|
|
2008
|
+
) {
|
|
2009
|
+
addTimer(clock, {
|
|
2010
|
+
func: resolve,
|
|
2011
|
+
args: [arg],
|
|
2012
|
+
delay: timeout,
|
|
2013
|
+
});
|
|
2010
2014
|
});
|
|
2011
|
-
}
|
|
2012
|
-
};
|
|
2015
|
+
};
|
|
2013
2016
|
}
|
|
2014
2017
|
|
|
2015
2018
|
clock.clearTimeout = function clearTimeout(timerId) {
|
|
@@ -2053,19 +2056,18 @@ function withGlobal(_global) {
|
|
|
2053
2056
|
};
|
|
2054
2057
|
|
|
2055
2058
|
if (typeof _global.Promise !== "undefined" && utilPromisify) {
|
|
2056
|
-
clock.setImmediate[
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
}
|
|
2068
|
-
};
|
|
2059
|
+
clock.setImmediate[utilPromisify.custom] =
|
|
2060
|
+
function promisifiedSetImmediate(arg) {
|
|
2061
|
+
return new _global.Promise(
|
|
2062
|
+
function setImmediateExecutor(resolve) {
|
|
2063
|
+
addTimer(clock, {
|
|
2064
|
+
func: resolve,
|
|
2065
|
+
args: [arg],
|
|
2066
|
+
immediate: true,
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
);
|
|
2070
|
+
};
|
|
2069
2071
|
}
|
|
2070
2072
|
|
|
2071
2073
|
clock.clearImmediate = function clearImmediate(timerId) {
|
|
@@ -2084,7 +2086,9 @@ function withGlobal(_global) {
|
|
|
2084
2086
|
const result = addTimer(clock, {
|
|
2085
2087
|
func: func,
|
|
2086
2088
|
delay: getTimeToNextFrame(),
|
|
2087
|
-
args
|
|
2089
|
+
get args() {
|
|
2090
|
+
return [fakePerformanceNow()];
|
|
2091
|
+
},
|
|
2088
2092
|
animation: true,
|
|
2089
2093
|
});
|
|
2090
2094
|
|
|
@@ -2371,8 +2375,9 @@ function withGlobal(_global) {
|
|
|
2371
2375
|
return;
|
|
2372
2376
|
}
|
|
2373
2377
|
|
|
2374
|
-
numTimers = Object.keys(
|
|
2375
|
-
.
|
|
2378
|
+
numTimers = Object.keys(
|
|
2379
|
+
clock.timers
|
|
2380
|
+
).length;
|
|
2376
2381
|
if (numTimers === 0) {
|
|
2377
2382
|
resetIsNearInfiniteLimit();
|
|
2378
2383
|
resolve(clock.now);
|
|
@@ -2420,7 +2425,7 @@ function withGlobal(_global) {
|
|
|
2420
2425
|
resolve(clock.now);
|
|
2421
2426
|
}
|
|
2422
2427
|
|
|
2423
|
-
resolve(clock.tickAsync(timer.callAt));
|
|
2428
|
+
resolve(clock.tickAsync(timer.callAt - clock.now));
|
|
2424
2429
|
} catch (e) {
|
|
2425
2430
|
reject(e);
|
|
2426
2431
|
}
|
|
@@ -2460,11 +2465,7 @@ function withGlobal(_global) {
|
|
|
2460
2465
|
|
|
2461
2466
|
if (performancePresent) {
|
|
2462
2467
|
clock.performance = Object.create(null);
|
|
2463
|
-
clock.performance.now =
|
|
2464
|
-
const hrt = hrtime();
|
|
2465
|
-
const millis = hrt[0] * 1000 + hrt[1] / 1e6;
|
|
2466
|
-
return millis;
|
|
2467
|
-
};
|
|
2468
|
+
clock.performance.now = fakePerformanceNow;
|
|
2468
2469
|
}
|
|
2469
2470
|
|
|
2470
2471
|
if (hrtimePresent) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as resolve } from './chunk-utils-env.
|
|
2
|
-
import { k as notNullish } from './chunk-typecheck-constants.
|
|
1
|
+
import { b as resolve } from './chunk-utils-env.4afc6329.js';
|
|
2
|
+
import { k as notNullish } from './chunk-typecheck-constants.e478eb98.js';
|
|
3
3
|
|
|
4
4
|
const lineSplitRE = /\r?\n/;
|
|
5
5
|
const stackIgnorePatterns = [
|
package/dist/cli-wrapper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import { p as picocolors, E as EXIT_CODE_RESTART } from './chunk-utils-env.
|
|
3
|
-
import { e as execa } from './vendor-index.
|
|
2
|
+
import { p as picocolors, E as EXIT_CODE_RESTART } from './chunk-utils-env.4afc6329.js';
|
|
3
|
+
import { e as execa } from './vendor-index.a323f2d0.js';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'path';
|
|
@@ -8,7 +8,7 @@ import 'node:buffer';
|
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:child_process';
|
|
10
10
|
import 'node:process';
|
|
11
|
-
import './vendor-index.
|
|
11
|
+
import './vendor-index.62932580.js';
|
|
12
12
|
import 'child_process';
|
|
13
13
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
14
14
|
import 'fs';
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as picocolors, n as normalize } from './chunk-utils-env.
|
|
1
|
+
import { p as picocolors, n as normalize } from './chunk-utils-env.4afc6329.js';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import { v as version, s as startVitest, d as divider } from './chunk-snapshot-manager.
|
|
3
|
+
import { v as version, s as startVitest, d as divider } from './chunk-snapshot-manager.8c94a052.js';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'path';
|
|
@@ -8,7 +8,7 @@ import './chunk-integrations-coverage.befed097.js';
|
|
|
8
8
|
import 'local-pkg';
|
|
9
9
|
import './chunk-env-node.b3664da2.js';
|
|
10
10
|
import 'node:console';
|
|
11
|
-
import './chunk-typecheck-constants.
|
|
11
|
+
import './chunk-typecheck-constants.e478eb98.js';
|
|
12
12
|
import 'node:path';
|
|
13
13
|
import 'vite';
|
|
14
14
|
import 'node:process';
|
|
@@ -21,10 +21,10 @@ import './vendor-_commonjsHelpers.addc3445.js';
|
|
|
21
21
|
import 'vite-node/client';
|
|
22
22
|
import 'vite-node/server';
|
|
23
23
|
import 'node:fs/promises';
|
|
24
|
-
import './vendor-index.
|
|
24
|
+
import './vendor-index.a323f2d0.js';
|
|
25
25
|
import 'node:buffer';
|
|
26
26
|
import 'node:child_process';
|
|
27
|
-
import './vendor-index.
|
|
27
|
+
import './vendor-index.62932580.js';
|
|
28
28
|
import 'child_process';
|
|
29
29
|
import 'assert';
|
|
30
30
|
import 'buffer';
|
|
@@ -37,11 +37,11 @@ import 'node:worker_threads';
|
|
|
37
37
|
import 'tinypool';
|
|
38
38
|
import './vendor-index.783e7f3e.js';
|
|
39
39
|
import 'perf_hooks';
|
|
40
|
-
import './chunk-utils-timers.
|
|
41
|
-
import './chunk-utils-source-map.
|
|
40
|
+
import './chunk-utils-timers.54caa12a.js';
|
|
41
|
+
import './chunk-utils-source-map.95b8b3f0.js';
|
|
42
42
|
import 'crypto';
|
|
43
43
|
import 'vite-node/utils';
|
|
44
|
-
import './vendor-index.
|
|
44
|
+
import './vendor-index.808a85a6.js';
|
|
45
45
|
import 'node:crypto';
|
|
46
46
|
import './chunk-magic-string.3a794426.js';
|
|
47
47
|
import 'strip-literal';
|
|
@@ -692,18 +692,24 @@ async function typecheck(cliFilters = [], options = {}) {
|
|
|
692
692
|
console.warn(picocolors.exports.yellow("Testing types with tsc and vue-tsc is an experimental feature.\nBreaking changes might not follow semver, please pin Vitest's version when using it."));
|
|
693
693
|
await start("typecheck", cliFilters, options);
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function normalizeCliOptions(argv) {
|
|
696
696
|
if (argv.root)
|
|
697
697
|
argv.root = normalize(argv.root);
|
|
698
|
+
else
|
|
699
|
+
delete argv.root;
|
|
698
700
|
if (argv.config)
|
|
699
701
|
argv.config = normalize(argv.config);
|
|
702
|
+
else
|
|
703
|
+
delete argv.config;
|
|
700
704
|
if (argv.dir)
|
|
701
705
|
argv.dir = normalize(argv.dir);
|
|
706
|
+
else
|
|
707
|
+
delete argv.dir;
|
|
702
708
|
return argv;
|
|
703
709
|
}
|
|
704
710
|
async function start(mode, cliFilters, options) {
|
|
705
711
|
try {
|
|
706
|
-
const ctx = await startVitest(mode, cliFilters.map(normalize),
|
|
712
|
+
const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(options));
|
|
707
713
|
if (!(ctx == null ? void 0 : ctx.config.watch))
|
|
708
714
|
await (ctx == null ? void 0 : ctx.exit());
|
|
709
715
|
return ctx;
|
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, ao as ResolvedCoverageOptions, F as FakeTimerInstallOpts } from './types-
|
|
3
|
+
import { U as UserConfig$1, ao as ResolvedCoverageOptions, F as FakeTimerInstallOpts } from './types-2a26f28c.js';
|
|
4
4
|
import 'tinybench';
|
|
5
5
|
import 'vite-node/client';
|
|
6
6
|
import 'vite-node/server';
|
package/dist/entry.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { promises } from 'node:fs';
|
|
2
|
-
import { g as getWorkerState, a as resetModules } from './chunk-typecheck-constants.
|
|
3
|
-
import { v as vi } from './chunk-utils-import.
|
|
2
|
+
import { g as getWorkerState, a as resetModules } from './chunk-typecheck-constants.e478eb98.js';
|
|
3
|
+
import { v as vi } from './chunk-utils-import.dc87c88c.js';
|
|
4
4
|
import { a as envs } from './chunk-env-node.b3664da2.js';
|
|
5
|
-
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-setup.
|
|
5
|
+
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-setup.f79addc3.js';
|
|
6
6
|
import 'node:path';
|
|
7
|
-
import './chunk-utils-env.
|
|
7
|
+
import './chunk-utils-env.4afc6329.js';
|
|
8
8
|
import 'tty';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'path';
|
|
11
11
|
import 'local-pkg';
|
|
12
|
-
import './chunk-runtime-chain.
|
|
12
|
+
import './chunk-runtime-chain.198631fd.js';
|
|
13
13
|
import 'util';
|
|
14
14
|
import 'chai';
|
|
15
15
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
16
|
-
import './chunk-runtime-rpc.
|
|
17
|
-
import './chunk-utils-timers.
|
|
18
|
-
import './chunk-utils-source-map.
|
|
16
|
+
import './chunk-runtime-rpc.503623e9.js';
|
|
17
|
+
import './chunk-utils-timers.54caa12a.js';
|
|
18
|
+
import './chunk-utils-source-map.95b8b3f0.js';
|
|
19
19
|
import 'fs';
|
|
20
20
|
import './spy.js';
|
|
21
21
|
import 'tinyspy';
|
|
22
22
|
import 'node:console';
|
|
23
23
|
import 'perf_hooks';
|
|
24
24
|
import './chunk-integrations-coverage.befed097.js';
|
|
25
|
-
import './chunk-runtime-error.
|
|
25
|
+
import './chunk-runtime-error.12631a44.js';
|
|
26
26
|
import 'vite-node/source-map';
|
|
27
27
|
|
|
28
28
|
function groupBy(collection, iteratee) {
|
package/dist/environments.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpyImpl } from 'tinyspy';
|
|
2
|
-
import { w as SuiteAPI, v as TestAPI, aw as BenchmarkAPI, y as SuiteHooks, H as HookListener, L as TestContext, p as Suite, x as HookCleanupCallback, O as OnTestFailedHandler, q as Test } from './types-
|
|
2
|
+
import { w as SuiteAPI, v as TestAPI, aw as BenchmarkAPI, y as SuiteHooks, H as HookListener, L as TestContext, p as Suite, x as HookCleanupCallback, O as OnTestFailedHandler, q as Test } from './types-2a26f28c.js';
|
|
3
3
|
|
|
4
4
|
declare type Not<T extends boolean> = T extends true ? false : true;
|
|
5
5
|
declare type And<Types extends boolean[]> = Types[number] extends true ? true : false;
|
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 { A as AssertType, E as EnhancedSpy, q as ExpectTypeOf, x as Mock, y as MockContext, w as MockInstance, z as Mocked, B as MockedClass, u as MockedFunction, v as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, r as assertType, h as beforeAll, k as beforeEach, g as bench, n as createExpect, e as describe, m as expect, p as expectTypeOf, i as it, o as onTestFailed, d as suite, t as test } from './index-
|
|
3
|
-
import { D as DoneCallback, F as FakeTimerInstallOpts, R as RuntimeConfig, a as File, T as TaskResultPack, b as ResolvedConfig, M as ModuleGraphData, c as Reporter } from './types-
|
|
4
|
-
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable, ap as BaseCoverageOptions, av as BenchFunction, at as Benchmark, aw as BenchmarkAPI, au as BenchmarkResult, as as BenchmarkUserOptions, B as BuiltinEnvironment, i as CSSModuleScopeStrategy, C as CollectLineNumbers, f as CollectLines, ab as Constructable, h as Context, ar as CoverageC8Options, aq as CoverageIstanbulOptions, an as CoverageOptions, ak as CoverageProvider, al as CoverageProviderModule, am as CoverageReporter, a9 as DeepMerge, D as DoneCallback, ae as Environment, E as EnvironmentOptions, ad as EnvironmentReturn, ai as ErrorWithDiff, a as File, x as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, a8 as MergeInsertions, ac as ModuleCache, M as ModuleGraphData, aa as MutableArray, a5 as Nullable, aj as OnServerRestartHandler, O as OnTestFailedHandler, ah as ParsedStack, ag as Position, d as RawErrsMap, c as Reporter, a0 as ResolveIdFunction, b as ResolvedConfig, ao as ResolvedCoverageOptions, g as RootAndTarget, l as RunMode, R as RuntimeConfig, K as RuntimeContext, S as SequenceHooks, P as SnapshotData, X as SnapshotMatchOptions, Y as SnapshotResult, W as SnapshotStateOptions, _ as SnapshotSummary, Q as SnapshotUpdateState, p as Suite, w as SuiteAPI, z as SuiteCollector, G as SuiteFactory, y as SuiteHooks, s as Task, n as TaskBase, o as TaskResult, T as TaskResultPack, m as TaskState, q as Test, v as TestAPI, L as TestContext, t as TestFunction, u as TestOptions, e as TscErrorInfo, r as TypeCheck, k as TypecheckConfig, Z as UncheckedSnapshot, U as UserConfig, af as UserConsoleLog, N as Vitest, V as VitestEnvironment, j as VitestRunMode, $ as WorkerContext, a3 as WorkerGlobalState, a2 as WorkerRPC } from './types-
|
|
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-40ebba2b.js';
|
|
2
|
+
export { A as AssertType, E as EnhancedSpy, q as ExpectTypeOf, x as Mock, y as MockContext, w as MockInstance, z as Mocked, B as MockedClass, u as MockedFunction, v as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, r as assertType, h as beforeAll, k as beforeEach, g as bench, n as createExpect, e as describe, m as expect, p as expectTypeOf, i as it, o as onTestFailed, d as suite, t as test } from './index-40ebba2b.js';
|
|
3
|
+
import { D as DoneCallback, F as FakeTimerInstallOpts, R as RuntimeConfig, a as File, T as TaskResultPack, b as ResolvedConfig, M as ModuleGraphData, c as Reporter } from './types-2a26f28c.js';
|
|
4
|
+
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable, ap as BaseCoverageOptions, av as BenchFunction, at as Benchmark, aw as BenchmarkAPI, au as BenchmarkResult, as as BenchmarkUserOptions, B as BuiltinEnvironment, i as CSSModuleScopeStrategy, C as CollectLineNumbers, f as CollectLines, ab as Constructable, h as Context, ar as CoverageC8Options, aq as CoverageIstanbulOptions, an as CoverageOptions, ak as CoverageProvider, al as CoverageProviderModule, am as CoverageReporter, a9 as DeepMerge, D as DoneCallback, ae as Environment, E as EnvironmentOptions, ad as EnvironmentReturn, ai as ErrorWithDiff, a as File, x as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, a8 as MergeInsertions, ac as ModuleCache, M as ModuleGraphData, aa as MutableArray, a5 as Nullable, aj as OnServerRestartHandler, O as OnTestFailedHandler, ah as ParsedStack, ag as Position, d as RawErrsMap, c as Reporter, a0 as ResolveIdFunction, b as ResolvedConfig, ao as ResolvedCoverageOptions, g as RootAndTarget, l as RunMode, R as RuntimeConfig, K as RuntimeContext, S as SequenceHooks, P as SnapshotData, X as SnapshotMatchOptions, Y as SnapshotResult, W as SnapshotStateOptions, _ as SnapshotSummary, Q as SnapshotUpdateState, p as Suite, w as SuiteAPI, z as SuiteCollector, G as SuiteFactory, y as SuiteHooks, s as Task, n as TaskBase, o as TaskResult, T as TaskResultPack, m as TaskState, q as Test, v as TestAPI, L as TestContext, t as TestFunction, u as TestOptions, e as TscErrorInfo, r as TypeCheck, k as TypecheckConfig, Z as UncheckedSnapshot, U as UserConfig, af as UserConsoleLog, N as Vitest, V as VitestEnvironment, j as VitestRunMode, $ as WorkerContext, a3 as WorkerGlobalState, a2 as WorkerRPC } from './types-2a26f28c.js';
|
|
5
5
|
import { TransformResult } from 'vite';
|
|
6
6
|
import * as chai from 'chai';
|
|
7
7
|
export { chai };
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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
|
-
import { e as dist } from './chunk-utils-import.
|
|
3
|
-
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, k as getRunningMode, h as isFirstRun, l as isWatchMode, o as onTestFailed, g as runOnce, v as vi, j as vitest, w as withCallback } from './chunk-utils-import.
|
|
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.198631fd.js';
|
|
2
|
+
import { e as dist } from './chunk-utils-import.dc87c88c.js';
|
|
3
|
+
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, k as getRunningMode, h as isFirstRun, l as isWatchMode, o as onTestFailed, g as runOnce, v as vi, j as vitest, w as withCallback } from './chunk-utils-import.dc87c88c.js';
|
|
4
4
|
import * as chai from 'chai';
|
|
5
5
|
export { chai };
|
|
6
6
|
export { assert, should } from 'chai';
|
|
7
7
|
import 'util';
|
|
8
|
-
import './chunk-typecheck-constants.
|
|
8
|
+
import './chunk-typecheck-constants.e478eb98.js';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './chunk-utils-env.
|
|
10
|
+
import './chunk-utils-env.4afc6329.js';
|
|
11
11
|
import 'tty';
|
|
12
12
|
import 'node:url';
|
|
13
13
|
import 'path';
|
|
14
14
|
import 'local-pkg';
|
|
15
15
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
16
|
-
import './chunk-runtime-rpc.
|
|
17
|
-
import './chunk-utils-timers.
|
|
16
|
+
import './chunk-runtime-rpc.503623e9.js';
|
|
17
|
+
import './chunk-utils-timers.54caa12a.js';
|
|
18
18
|
import 'node:fs';
|
|
19
|
-
import './chunk-utils-source-map.
|
|
19
|
+
import './chunk-utils-source-map.95b8b3f0.js';
|
|
20
20
|
import 'fs';
|
|
21
21
|
import './spy.js';
|
|
22
22
|
import 'tinyspy';
|
package/dist/loader.js
CHANGED
|
@@ -2,7 +2,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { i as isNodeBuiltin, h as hasCJSSyntax } from './vendor-index.2e96c50b.js';
|
|
4
4
|
import { normalizeModuleId } from 'vite-node/utils';
|
|
5
|
-
import { g as getWorkerState } from './chunk-typecheck-constants.
|
|
5
|
+
import { g as getWorkerState } from './chunk-typecheck-constants.e478eb98.js';
|
|
6
6
|
import 'acorn';
|
|
7
7
|
import 'node:module';
|
|
8
8
|
import 'node:fs';
|
|
@@ -13,7 +13,7 @@ import 'module';
|
|
|
13
13
|
import 'assert';
|
|
14
14
|
import 'util';
|
|
15
15
|
import 'node:path';
|
|
16
|
-
import './chunk-utils-env.
|
|
16
|
+
import './chunk-utils-env.4afc6329.js';
|
|
17
17
|
import 'tty';
|
|
18
18
|
import 'local-pkg';
|
|
19
19
|
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as VitestRunMode, U as UserConfig, N as Vitest, ax as MockMap, ay as TestSequencer } from './types-
|
|
2
|
-
export { ay as TestSequencer, aA as TestSequencerConstructor, N as Vitest, az as startVitest } from './types-
|
|
1
|
+
import { j as VitestRunMode, U as UserConfig, N as Vitest, ax as MockMap, ay as TestSequencer } from './types-2a26f28c.js';
|
|
2
|
+
export { ay as TestSequencer, aA as TestSequencerConstructor, N as Vitest, az as startVitest } from './types-2a26f28c.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import { ViteNodeRunner } from 'vite-node/client';
|
|
5
5
|
import { ViteNodeRunnerOptions } from 'vite-node';
|
package/dist/node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-snapshot-manager.
|
|
2
|
-
export { V as VitestRunner } from './chunk-runtime-mocker.
|
|
3
|
-
import './chunk-utils-env.
|
|
1
|
+
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-snapshot-manager.8c94a052.js';
|
|
2
|
+
export { V as VitestRunner } from './chunk-runtime-mocker.03096876.js';
|
|
3
|
+
import './chunk-utils-env.4afc6329.js';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'path';
|
|
@@ -8,7 +8,7 @@ import './chunk-integrations-coverage.befed097.js';
|
|
|
8
8
|
import 'local-pkg';
|
|
9
9
|
import './chunk-env-node.b3664da2.js';
|
|
10
10
|
import 'node:console';
|
|
11
|
-
import './chunk-typecheck-constants.
|
|
11
|
+
import './chunk-typecheck-constants.e478eb98.js';
|
|
12
12
|
import 'node:path';
|
|
13
13
|
import 'vite';
|
|
14
14
|
import 'node:process';
|
|
@@ -22,10 +22,10 @@ import './vendor-_commonjsHelpers.addc3445.js';
|
|
|
22
22
|
import 'vite-node/client';
|
|
23
23
|
import 'vite-node/server';
|
|
24
24
|
import 'node:fs/promises';
|
|
25
|
-
import './vendor-index.
|
|
25
|
+
import './vendor-index.a323f2d0.js';
|
|
26
26
|
import 'node:buffer';
|
|
27
27
|
import 'node:child_process';
|
|
28
|
-
import './vendor-index.
|
|
28
|
+
import './vendor-index.62932580.js';
|
|
29
29
|
import 'child_process';
|
|
30
30
|
import 'assert';
|
|
31
31
|
import 'buffer';
|
|
@@ -38,11 +38,11 @@ import 'node:worker_threads';
|
|
|
38
38
|
import 'tinypool';
|
|
39
39
|
import './vendor-index.783e7f3e.js';
|
|
40
40
|
import 'perf_hooks';
|
|
41
|
-
import './chunk-utils-timers.
|
|
42
|
-
import './chunk-utils-source-map.
|
|
41
|
+
import './chunk-utils-timers.54caa12a.js';
|
|
42
|
+
import './chunk-utils-source-map.95b8b3f0.js';
|
|
43
43
|
import 'crypto';
|
|
44
44
|
import 'vite-node/utils';
|
|
45
|
-
import './vendor-index.
|
|
45
|
+
import './vendor-index.808a85a6.js';
|
|
46
46
|
import 'node:crypto';
|
|
47
47
|
import './chunk-magic-string.3a794426.js';
|
|
48
48
|
import 'strip-literal';
|
package/dist/suite.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import 'util';
|
|
2
2
|
import 'chai';
|
|
3
|
-
import './chunk-typecheck-constants.
|
|
4
|
-
export { b as bench, f as clearCollectorContext, q as createSuiteHooks, h as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.
|
|
3
|
+
import './chunk-typecheck-constants.e478eb98.js';
|
|
4
|
+
export { b as bench, f as clearCollectorContext, q as createSuiteHooks, h as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.198631fd.js';
|
|
5
5
|
import 'node:path';
|
|
6
|
-
import './chunk-utils-env.
|
|
6
|
+
import './chunk-utils-env.4afc6329.js';
|
|
7
7
|
import 'tty';
|
|
8
8
|
import 'node:url';
|
|
9
9
|
import 'path';
|
|
10
10
|
import 'local-pkg';
|
|
11
11
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
12
|
-
import './chunk-runtime-rpc.
|
|
13
|
-
import './chunk-utils-timers.
|
|
12
|
+
import './chunk-runtime-rpc.503623e9.js';
|
|
13
|
+
import './chunk-utils-timers.54caa12a.js';
|
|
14
14
|
import 'node:fs';
|
|
15
|
-
import './chunk-utils-source-map.
|
|
15
|
+
import './chunk-utils-source-map.95b8b3f0.js';
|
|
16
16
|
import 'fs';
|
|
17
17
|
import './spy.js';
|
|
18
18
|
import 'tinyspy';
|
|
@@ -972,6 +972,7 @@ interface Suite extends TaskBase {
|
|
|
972
972
|
tasks: Task[];
|
|
973
973
|
filepath?: string;
|
|
974
974
|
benchmark?: Bench;
|
|
975
|
+
projectName?: string;
|
|
975
976
|
}
|
|
976
977
|
interface File extends Suite {
|
|
977
978
|
filepath: string;
|
|
@@ -1454,6 +1455,10 @@ interface EnvironmentOptions {
|
|
|
1454
1455
|
}
|
|
1455
1456
|
type VitestRunMode = 'test' | 'benchmark' | 'typecheck';
|
|
1456
1457
|
interface InlineConfig {
|
|
1458
|
+
/**
|
|
1459
|
+
* Name of the project. Will be used to display in the reporter.
|
|
1460
|
+
*/
|
|
1461
|
+
name?: string;
|
|
1457
1462
|
/**
|
|
1458
1463
|
* Benchmark options.
|
|
1459
1464
|
*
|
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@ import { Buffer } from 'node:buffer';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import childProcess from 'node:child_process';
|
|
4
4
|
import process$1 from 'node:process';
|
|
5
|
-
import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn } from './vendor-index.
|
|
5
|
+
import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn } from './vendor-index.62932580.js';
|
|
6
6
|
import url from 'node:url';
|
|
7
7
|
import { constants } from 'os';
|
|
8
8
|
import os from 'node:os';
|
package/dist/worker.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as resolve, e as distDir } from './chunk-utils-env.
|
|
1
|
+
import { b as resolve, e as distDir } from './chunk-utils-env.4afc6329.js';
|
|
2
2
|
import { c as createBirpc } from './vendor-index.783e7f3e.js';
|
|
3
3
|
import { workerId } from 'tinypool';
|
|
4
4
|
import { ModuleCacheMap } from 'vite-node/client';
|
|
5
|
-
import { g as getWorkerState } from './chunk-typecheck-constants.
|
|
6
|
-
import { e as executeInViteNode } from './chunk-runtime-mocker.
|
|
7
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
8
|
-
import { p as processError } from './chunk-runtime-error.
|
|
5
|
+
import { g as getWorkerState } from './chunk-typecheck-constants.e478eb98.js';
|
|
6
|
+
import { e as executeInViteNode } from './chunk-runtime-mocker.03096876.js';
|
|
7
|
+
import { r as rpc } from './chunk-runtime-rpc.503623e9.js';
|
|
8
|
+
import { p as processError } from './chunk-runtime-error.12631a44.js';
|
|
9
9
|
import 'tty';
|
|
10
10
|
import 'node:url';
|
|
11
11
|
import 'path';
|
|
@@ -22,7 +22,7 @@ import 'fs';
|
|
|
22
22
|
import 'module';
|
|
23
23
|
import 'assert';
|
|
24
24
|
import 'util';
|
|
25
|
-
import './chunk-utils-timers.
|
|
25
|
+
import './chunk-utils-timers.54caa12a.js';
|
|
26
26
|
import 'chai';
|
|
27
27
|
|
|
28
28
|
let _viteNode;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.26.
|
|
4
|
+
"version": "0.26.2",
|
|
5
5
|
"description": "A blazing fast unit test framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
"tinypool": "^0.3.0",
|
|
115
115
|
"tinyspy": "^1.0.2",
|
|
116
116
|
"vite": "^3.0.0 || ^4.0.0",
|
|
117
|
-
"vite-node": "0.26.
|
|
117
|
+
"vite-node": "0.26.2"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@antfu/install-pkg": "^0.1.1",
|
|
121
121
|
"@edge-runtime/vm": "2.0.2",
|
|
122
|
-
"@sinonjs/fake-timers": "^10.0.
|
|
122
|
+
"@sinonjs/fake-timers": "^10.0.2",
|
|
123
123
|
"@types/diff": "^5.0.2",
|
|
124
124
|
"@types/jsdom": "^20.0.1",
|
|
125
125
|
"@types/micromatch": "^4.0.2",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"strip-ansi": "^7.0.1",
|
|
156
156
|
"typescript": "^4.9.4",
|
|
157
157
|
"ws": "^8.11.0",
|
|
158
|
-
"@vitest/ui": "0.26.
|
|
158
|
+
"@vitest/ui": "0.26.2"
|
|
159
159
|
},
|
|
160
160
|
"scripts": {
|
|
161
161
|
"build": "rimraf dist && rollup -c",
|