vitest 1.0.0-beta.4 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -513
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +4 -4
- package/dist/child.js +13 -17
- package/dist/{chunk-api-setup.6d19ab38.js → chunks/api-setup.jHV5vgr2.js} +97 -39
- package/dist/chunks/install-pkg.ORGzQeqb.js +457 -0
- package/dist/chunks/integrations-globals.-pds_Gug.js +29 -0
- package/dist/{chunk-node-git.6c12e560.js → chunks/node-git.Hw101KjS.js} +1 -18
- package/dist/{chunk-runtime-console.f3263f87.js → chunks/runtime-console.iCAG0Yz3.js} +1 -1
- package/dist/cli-wrapper.js +2 -18
- package/dist/cli.js +18 -23
- package/dist/config.cjs +1 -1
- package/dist/config.d.ts +4 -6
- package/dist/config.js +1 -1
- package/dist/coverage.d.ts +25 -15
- package/dist/coverage.js +118 -49
- package/dist/entry-vm.js +13 -13
- package/dist/entry.js +14 -14
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +3 -3
- package/dist/index.d.ts +166 -38
- package/dist/index.js +10 -10
- package/dist/node.d.ts +5 -5
- package/dist/node.js +17 -22
- package/dist/{vendor-paths.84fc7a99.js → paths.js} +1 -1
- package/dist/{reporters-50c2bd49.d.ts → reporters-ANEBTnOh.d.ts} +324 -361
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +7 -8
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +8 -8
- package/dist/{suite-ad69b7cd.d.ts → suite-C1OmA61l.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/suite.js +3 -3
- package/dist/{vendor-benchmark.b6befc50.js → vendor/benchmark.WVm6DARl.js} +1 -1
- package/dist/{vendor-execute.157302d6.js → vendor/execute.aMjV5C9u.js} +2 -4
- package/dist/{vendor-index.72df742e.js → vendor/index.Npc-eff0.js} +4 -4
- package/dist/{vendor-index.2b92937b.js → vendor/index.XU72Rmy8.js} +1 -1
- package/dist/{vendor-index.57925a34.js → vendor/index.h0j9y5vy.js} +5 -5
- package/dist/vendor/index.xL8XjTLv.js +3962 -0
- package/dist/vendor/loader.CU0NY2Is.js +39 -0
- package/dist/{vendor-node.65461b16.js → vendor/node.c-kzGvOB.js} +1874 -5960
- package/dist/{vendor-reporters.d24d80a4.js → vendor/reporters.1xKxm8im.js} +424 -374
- package/dist/{vendor-rpc.171f65fb.js → vendor/rpc.Bl-ysZIr.js} +1 -1
- package/dist/{vendor-run-once.fb836747.js → vendor/run-once.X3E7xx3F.js} +1 -1
- package/dist/{vendor-vi.3baa7c4a.js → vendor/vi.voNYQWB_.js} +4 -4
- package/dist/vm.js +13 -18
- package/dist/worker.js +13 -18
- package/index.cjs +5 -0
- package/package.json +49 -53
- package/dist/chunk-install-pkg.e1d6323e.js +0 -1740
- package/dist/chunk-integrations-globals.2b099e04.js +0 -29
- package/dist/vendor-index.8efe7746.js +0 -2236
- package/dist/vendor-loader.9c966f23.js +0 -2089
- /package/dist/{vendor-_commonjsHelpers.7d1333e8.js → vendor/_commonjsHelpers.jjO7Zipk.js} +0 -0
- /package/dist/{vendor-base.9c08bbd0.js → vendor/base._79unx2z.js} +0 -0
- /package/dist/{vendor-constants.538d9b49.js → vendor/constants.WSvnD_fn.js} +0 -0
- /package/dist/{vendor-coverage.78040316.js → vendor/coverage.v6aD8iAh.js} +0 -0
- /package/dist/{vendor-date.6e993429.js → vendor/date.W90-E5kF.js} +0 -0
- /package/dist/{vendor-environments.dcc4a34e.js → vendor/environments.hpEVJZPC.js} +0 -0
- /package/dist/{vendor-global.c3664e75.js → vendor/global.L7JRz1qU.js} +0 -0
- /package/dist/{vendor-index.1ca68bd5.js → vendor/index.cAUulNDf.js} +0 -0
- /package/dist/{vendor-inspector.209edf5a.js → vendor/inspector.lFAeuaAt.js} +0 -0
- /package/dist/{vendor-tasks.f9d75aed.js → vendor/tasks.IknbGB2n.js} +0 -0
package/dist/reporters.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ay as BaseReporter, aq as BasicReporter, aC as BenchmarkBuiltinReporters, aB as BenchmarkReportsMap, aA as BuiltinReporters, ap as DefaultReporter, ar as DotReporter, ax as HangingProcessReporter, av as JUnitReporter, as as JsonReporter, q as Reporter, az as ReportersMap, aw as TapFlatReporter, au as TapReporter, at as VerboseReporter } from './reporters-ANEBTnOh.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
package/dist/reporters.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { f as BasicReporter, B as BenchmarkReportsMap, D as DefaultReporter, g as DotReporter, H as HangingProcessReporter, h as JUnitReporter, J as JsonReporter, R as ReportersMap, i as TapFlatReporter, T as TapReporter, V as VerboseReporter } from './vendor/reporters.1xKxm8im.js';
|
|
2
2
|
import 'node:perf_hooks';
|
|
3
3
|
import 'picocolors';
|
|
4
|
-
import './vendor
|
|
4
|
+
import './vendor/index.XU72Rmy8.js';
|
|
5
5
|
import 'pathe';
|
|
6
6
|
import 'std-env';
|
|
7
7
|
import '@vitest/runner/utils';
|
|
8
8
|
import '@vitest/utils';
|
|
9
|
-
import './vendor
|
|
10
|
-
import './
|
|
9
|
+
import './vendor/global.L7JRz1qU.js';
|
|
10
|
+
import './chunks/runtime-console.iCAG0Yz3.js';
|
|
11
11
|
import 'node:stream';
|
|
12
12
|
import 'node:console';
|
|
13
13
|
import 'node:path';
|
|
14
|
-
import './vendor
|
|
15
|
-
import './vendor
|
|
16
|
-
import './vendor
|
|
17
|
-
import './vendor-_commonjsHelpers.7d1333e8.js';
|
|
14
|
+
import './vendor/date.W90-E5kF.js';
|
|
15
|
+
import './vendor/base._79unx2z.js';
|
|
16
|
+
import './vendor/tasks.IknbGB2n.js';
|
|
18
17
|
import 'node:fs';
|
|
19
18
|
import '@vitest/utils/source-map';
|
|
20
19
|
import 'node:os';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VitestRunner, VitestRunnerImportSource, Suite, Test, CancelReason, Custom, TaskContext, ExtendedContext } from '@vitest/runner';
|
|
2
|
-
import { R as ResolvedConfig } from './reporters-
|
|
2
|
+
import { R as ResolvedConfig } from './reporters-ANEBTnOh.js';
|
|
3
3
|
import * as tinybench from 'tinybench';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import 'vite-node';
|
package/dist/runners.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
|
|
2
|
-
import { g as getSnapshotClient, c as createExpect, v as vi } from './vendor
|
|
3
|
-
import './vendor
|
|
4
|
-
import { a as rpc } from './vendor
|
|
5
|
-
import { g as getFullName } from './vendor
|
|
6
|
-
import { g as getWorkerState } from './vendor
|
|
2
|
+
import { g as getSnapshotClient, c as createExpect, v as vi } from './vendor/vi.voNYQWB_.js';
|
|
3
|
+
import './vendor/index.XU72Rmy8.js';
|
|
4
|
+
import { a as rpc } from './vendor/rpc.Bl-ysZIr.js';
|
|
5
|
+
import { g as getFullName } from './vendor/tasks.IknbGB2n.js';
|
|
6
|
+
import { g as getWorkerState } from './vendor/global.L7JRz1qU.js';
|
|
7
7
|
import { getNames } from '@vitest/runner/utils';
|
|
8
8
|
import { updateTask } from '@vitest/runner';
|
|
9
9
|
import { createDefer, getSafeTimers } from '@vitest/utils';
|
|
10
|
-
import { a as getBenchOptions, g as getBenchFn } from './vendor
|
|
10
|
+
import { a as getBenchOptions, g as getBenchFn } from './vendor/benchmark.WVm6DARl.js';
|
|
11
11
|
import 'chai';
|
|
12
|
-
import './vendor
|
|
12
|
+
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
13
13
|
import '@vitest/snapshot';
|
|
14
14
|
import '@vitest/utils/error';
|
|
15
15
|
import '@vitest/utils/source-map';
|
|
16
|
-
import './vendor
|
|
16
|
+
import './vendor/date.W90-E5kF.js';
|
|
17
17
|
import '@vitest/spy';
|
|
18
18
|
import 'pathe';
|
|
19
19
|
import 'std-env';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Custom } from '@vitest/runner';
|
|
2
2
|
import '@vitest/runner/utils';
|
|
3
|
-
import {
|
|
3
|
+
import { ak as BenchFunction, al as BenchmarkAPI } from './reporters-ANEBTnOh.js';
|
|
4
4
|
import { Options } from 'tinybench';
|
|
5
5
|
|
|
6
6
|
declare function getBenchOptions(key: Custom): Options;
|
package/dist/suite.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createTaskCollector, getCurrentSuite, getFn, setFn } from '@vitest/runner';
|
|
2
2
|
export { createChainable } from '@vitest/runner/utils';
|
|
3
|
-
export { g as getBenchFn, a as getBenchOptions } from './suite-
|
|
4
|
-
import './reporters-
|
|
3
|
+
export { g as getBenchFn, a as getBenchOptions } from './suite-C1OmA61l.js';
|
|
4
|
+
import './reporters-ANEBTnOh.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import 'vite-node';
|
|
7
7
|
import '@vitest/snapshot';
|
package/dist/suite.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { createTaskCollector, getCurrentSuite, getFn, setFn } from '@vitest/runner';
|
|
2
2
|
export { createChainable } from '@vitest/runner/utils';
|
|
3
|
-
export { g as getBenchFn, a as getBenchOptions } from './vendor
|
|
3
|
+
export { g as getBenchFn, a as getBenchOptions } from './vendor/benchmark.WVm6DARl.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
|
-
import './vendor
|
|
5
|
+
import './vendor/index.XU72Rmy8.js';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import 'std-env';
|
|
8
|
-
import './vendor
|
|
8
|
+
import './vendor/global.L7JRz1qU.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentSuite } from '@vitest/runner';
|
|
2
2
|
import { createChainable } from '@vitest/runner/utils';
|
|
3
3
|
import { noop } from '@vitest/utils';
|
|
4
|
-
import { i as isRunningInBenchmark } from './
|
|
4
|
+
import { i as isRunningInBenchmark } from './index.XU72Rmy8.js';
|
|
5
5
|
|
|
6
6
|
const benchFns = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
const benchOptsMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -4,10 +4,10 @@ import { ModuleCacheMap, ViteNodeRunner, DEFAULT_REQUEST_STUBS } from 'vite-node
|
|
|
4
4
|
import { isNodeBuiltin, isPrimitive, toArray, getCachedData, setCacheData, isInternalRequest } from 'vite-node/utils';
|
|
5
5
|
import { resolve, isAbsolute, dirname, join, basename, extname, normalize, relative } from 'pathe';
|
|
6
6
|
import { processError } from '@vitest/utils/error';
|
|
7
|
-
import {
|
|
7
|
+
import { distDir } from '../paths.js';
|
|
8
8
|
import { existsSync, readdirSync, statSync, readFileSync } from 'node:fs';
|
|
9
9
|
import { getColors, getType } from '@vitest/utils';
|
|
10
|
-
import { b as getAllMockableProperties } from './
|
|
10
|
+
import { b as getAllMockableProperties } from './base._79unx2z.js';
|
|
11
11
|
import { dirname as dirname$1 } from 'node:path';
|
|
12
12
|
import { createRequire, Module } from 'node:module';
|
|
13
13
|
import { CSS_LANGS_RE, KNOWN_ASSET_RE } from 'vite-node/constants';
|
|
@@ -430,8 +430,6 @@ class CommonjsExecutor {
|
|
|
430
430
|
static _resolveLookupPaths = Module._resolveLookupPaths;
|
|
431
431
|
// @ts-expect-error not typed
|
|
432
432
|
static globalPaths = Module.globalPaths;
|
|
433
|
-
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
434
|
-
// @ts-ignore not typed in lower versions
|
|
435
433
|
static isBuiltin = Module.isBuiltin;
|
|
436
434
|
static Module = Module$1;
|
|
437
435
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
|
|
2
|
-
import { b as bench } from './
|
|
3
|
-
import { i as isFirstRun, r as runOnce } from './
|
|
4
|
-
import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './
|
|
5
|
-
import { g as getWorkerState } from './
|
|
2
|
+
import { b as bench } from './benchmark.WVm6DARl.js';
|
|
3
|
+
import { i as isFirstRun, r as runOnce } from './run-once.X3E7xx3F.js';
|
|
4
|
+
import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.voNYQWB_.js';
|
|
5
|
+
import { g as getWorkerState } from './global.L7JRz1qU.js';
|
|
6
6
|
import * as chai from 'chai';
|
|
7
7
|
import { assert, should } from 'chai';
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { relative } from 'pathe';
|
|
|
2
2
|
import 'std-env';
|
|
3
3
|
import '@vitest/runner/utils';
|
|
4
4
|
import '@vitest/utils';
|
|
5
|
-
import { g as getWorkerState } from './
|
|
5
|
+
import { g as getWorkerState } from './global.L7JRz1qU.js';
|
|
6
6
|
|
|
7
7
|
var _a;
|
|
8
8
|
const isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a = process.versions) == null ? void 0 : _a.deno) && !globalThis.window;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as chai from 'chai';
|
|
2
2
|
import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment';
|
|
3
3
|
import { resolve } from 'pathe';
|
|
4
|
-
import {
|
|
5
|
-
import { g as getWorkerState } from './
|
|
6
|
-
import { a as rpc } from './
|
|
7
|
-
import { t as takeCoverageInsideWorker } from './
|
|
8
|
-
import { loadDiffConfig } from '
|
|
4
|
+
import { distDir } from '../paths.js';
|
|
5
|
+
import { g as getWorkerState } from './global.L7JRz1qU.js';
|
|
6
|
+
import { a as rpc } from './rpc.Bl-ysZIr.js';
|
|
7
|
+
import { t as takeCoverageInsideWorker } from './coverage.v6aD8iAh.js';
|
|
8
|
+
import { loadDiffConfig } from '../browser.js';
|
|
9
9
|
|
|
10
10
|
function setupChaiConfig(config) {
|
|
11
11
|
Object.assign(chai.config, config);
|