vitest 2.0.0-beta.11 → 2.0.0-beta.12
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 +1 -1
- package/dist/browser.js +1 -1
- package/dist/chunks/browser-creator.Bw94IHrL.js +673 -0
- package/dist/chunks/{environments-node.39w4gmlF.js → environments-node.XE5FbRPQ.js} +1 -1
- package/dist/chunks/{integrations-globals.CC2ed6Py.js → integrations-globals.DSNOaUHv.js} +5 -5
- package/dist/chunks/{runtime-console.Ckl0vEQr.js → runtime-console.O41g23Zj.js} +1 -1
- package/dist/chunks/{runtime-runBaseTests.BXW_BJeO.js → runtime-runBaseTests.BDt9gQFB.js} +8 -8
- package/dist/cli.js +1 -1
- package/dist/config.cjs +3 -2
- package/dist/config.d.ts +1 -1
- package/dist/config.js +3 -2
- package/dist/coverage.d.ts +3 -2
- package/dist/coverage.js +3 -2
- package/dist/environments.d.ts +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/node.d.ts +3 -3
- package/dist/node.js +10 -9
- package/dist/{reporters-fiIq_dT9.d.ts → reporters-Cd1vkLMZ.d.ts} +18 -5
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +4 -4
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +4 -4
- package/dist/snapshot.js +2 -2
- package/dist/{suite-D4aoU9rI.d.ts → suite-BS2CV79a.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/suite.js +3 -3
- package/dist/vendor/{base.C2DbLEfT.js → base.Cy97mmVC.js} +1 -1
- package/dist/vendor/{benchmark.CMp8QfyL.js → benchmark.B6pblCp2.js} +1 -1
- package/dist/vendor/{cac.BcJW7n2j.js → cac.DRNUX42m.js} +13 -3
- package/dist/vendor/{cli-api.C8t8m4__.js → cli-api.Bu-PSdzx.js} +39 -6586
- package/dist/vendor/env.2ltrQNq0.js +8 -0
- package/dist/vendor/{index.-dbR4KUi.js → index.B7pSlOSa.js} +2 -2
- package/dist/vendor/{index.C9Thslzw.js → index.BJmtb_7W.js} +1 -1
- package/dist/vendor/index.D6GZqexG.js +6575 -0
- package/dist/vendor/{index.CQJ2m700.js → index.Hqvcg1pf.js} +2 -2
- package/dist/vendor/{index.BC5zhX9y.js → index.ZtQtNPP2.js} +4 -4
- package/dist/vendor/{setup-common.uqZOEWuR.js → setup-common.CWnv_2-5.js} +1 -1
- package/dist/vendor/{vi.BPjl8cAZ.js → vi.DXACdGTu.js} +1 -1
- package/dist/vendor/{vm.CycSoHnJ.js → vm.D9wVR14y.js} +2 -2
- package/dist/workers/forks.js +1 -1
- package/dist/workers/runVmTests.js +7 -7
- package/dist/workers/threads.js +1 -1
- package/dist/workers/vmForks.js +3 -3
- package/dist/workers/vmThreads.js +3 -3
- package/dist/workers.d.ts +1 -1
- package/dist/workers.js +4 -4
- package/package.json +9 -9
- package/dist/vendor/env.bmJgw1qP.js +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
2
|
-
import { b as bench } from './benchmark.
|
|
2
|
+
import { b as bench } from './benchmark.B6pblCp2.js';
|
|
3
3
|
import { i as isFirstRun, a as runOnce } from './run-once.Db8Hgq9X.js';
|
|
4
|
-
import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.
|
|
4
|
+
import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.DXACdGTu.js';
|
|
5
5
|
import { g as getWorkerState } from './global.7bFbnyXl.js';
|
|
6
6
|
import * as chai from 'chai';
|
|
7
7
|
import { assert, should } from 'chai';
|
|
@@ -4,13 +4,13 @@ import * as pathe from 'pathe';
|
|
|
4
4
|
import { basename, dirname, resolve, join, relative, extname, normalize } from 'pathe';
|
|
5
5
|
import { a as getFullName, h as hasFailedSnapshot } from './tasks.DhVtQBtW.js';
|
|
6
6
|
import { getSafeTimers, notNullish, highlight, shuffle, inspect, positionToOffset, lineSplitRE } from '@vitest/utils';
|
|
7
|
-
import { i as isNode } from './env.
|
|
7
|
+
import { i as isNode, a as isDeno } from './env.2ltrQNq0.js';
|
|
8
8
|
import { g as getStateSymbol, f as formatProjectName, p as pointer, F as F_RIGHT, a as F_POINTER, r as renderSnapshotSummary, b as getStateString, c as formatTimeString, d as countTestErrors, e as divider, s as stripAnsi, h as getCols, i as getHookStateSymbol } from './utils.DSO2UK15.js';
|
|
9
9
|
import { generateHash, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, getTasks, getTests, hasFailed, getSuites } from '@vitest/runner/utils';
|
|
10
10
|
import { performance } from 'node:perf_hooks';
|
|
11
11
|
import { TraceMap, generatedPositionFor, parseStacktrace, parseErrorStacktrace } from '@vitest/utils/source-map';
|
|
12
|
-
import { r as relativePath } from './index.
|
|
13
|
-
import { UNKNOWN_TEST_ID } from '../chunks/runtime-console.
|
|
12
|
+
import { r as relativePath } from './index.BJmtb_7W.js';
|
|
13
|
+
import { UNKNOWN_TEST_ID } from '../chunks/runtime-console.O41g23Zj.js';
|
|
14
14
|
import { t as toArray, b as isPrimitive } from './base.CTYV4Gnz.js';
|
|
15
15
|
import { isCI } from 'std-env';
|
|
16
16
|
import nodeos__default, { hostname } from 'node:os';
|
|
@@ -1057,7 +1057,7 @@ class BaseReporter {
|
|
|
1057
1057
|
_offUnhandledRejection;
|
|
1058
1058
|
constructor(options = {}) {
|
|
1059
1059
|
var _a;
|
|
1060
|
-
this.isTTY = options.isTTY ?? (isNode && ((_a = process.stdout) == null ? void 0 : _a.isTTY) && !isCI);
|
|
1060
|
+
this.isTTY = options.isTTY ?? ((isNode || isDeno) && ((_a = process.stdout) == null ? void 0 : _a.isTTY) && !isCI);
|
|
1061
1061
|
this.registerUnhandledRejection();
|
|
1062
1062
|
}
|
|
1063
1063
|
get mode() {
|
|
@@ -13,7 +13,7 @@ async function setupCommonEnv(config) {
|
|
|
13
13
|
globalSetup = true;
|
|
14
14
|
setSafeTimers();
|
|
15
15
|
if (config.globals) {
|
|
16
|
-
(await import('../chunks/integrations-globals.
|
|
16
|
+
(await import('../chunks/integrations-globals.DSNOaUHv.js')).registerApiGlobally();
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
function setupDefines(defines) {
|
|
@@ -9,7 +9,7 @@ import { g as getTestName } from './tasks.DhVtQBtW.js';
|
|
|
9
9
|
import { g as getWorkerState, a as getCurrentEnvironment } from './global.7bFbnyXl.js';
|
|
10
10
|
import { getSafeTimers, assertTypes, createSimpleStackTrace } from '@vitest/utils';
|
|
11
11
|
import 'pathe';
|
|
12
|
-
import './env.
|
|
12
|
+
import './env.2ltrQNq0.js';
|
|
13
13
|
import { parseSingleStack } from '@vitest/utils/source-map';
|
|
14
14
|
import { i as isChildProcess } from './base.CTYV4Gnz.js';
|
|
15
15
|
import { R as RealDate, r as resetDate, m as mockDate } from './date.W2xKR2qe.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vm, { isContext } from 'node:vm';
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
3
3
|
import { dirname, basename, extname, normalize, join, resolve } from 'pathe';
|
|
4
|
-
import { createCustomConsole } from '../chunks/runtime-console.
|
|
4
|
+
import { createCustomConsole } from '../chunks/runtime-console.O41g23Zj.js';
|
|
5
5
|
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.T3gg2ZK6.js';
|
|
6
6
|
import { distDir } from '../path.js';
|
|
7
7
|
import { dirname as dirname$1 } from 'node:path';
|
|
@@ -12,7 +12,7 @@ import { CSS_LANGS_RE, KNOWN_ASSET_RE } from 'vite-node/constants';
|
|
|
12
12
|
import '@vitest/runner/utils';
|
|
13
13
|
import '@vitest/utils';
|
|
14
14
|
import { p as provideWorkerState } from './global.7bFbnyXl.js';
|
|
15
|
-
import './env.
|
|
15
|
+
import './env.2ltrQNq0.js';
|
|
16
16
|
|
|
17
17
|
const _require = createRequire(import.meta.url);
|
|
18
18
|
const requiresCache = /* @__PURE__ */ new WeakMap();
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
2
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../vendor/utils.DkxLWvS1.js';
|
|
3
|
-
import { r as runBaseTests } from '../vendor/base.
|
|
3
|
+
import { r as runBaseTests } from '../vendor/base.Cy97mmVC.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'vite-node/client';
|
|
6
6
|
import '../vendor/global.7bFbnyXl.js';
|
|
@@ -6,11 +6,11 @@ import { performance } from 'node:perf_hooks';
|
|
|
6
6
|
import { startTests } from '@vitest/runner';
|
|
7
7
|
import { setupColors, createColors } from '@vitest/utils';
|
|
8
8
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
9
|
-
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../vendor/index
|
|
9
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../vendor/index.B7pSlOSa.js';
|
|
10
10
|
import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.BhYSDdTT.js';
|
|
11
11
|
import { g as getWorkerState } from '../vendor/global.7bFbnyXl.js';
|
|
12
|
-
import { V as VitestIndex } from '../vendor/index.
|
|
13
|
-
import { s as setupCommonEnv } from '../vendor/setup-common.
|
|
12
|
+
import { V as VitestIndex } from '../vendor/index.Hqvcg1pf.js';
|
|
13
|
+
import { s as setupCommonEnv } from '../vendor/setup-common.CWnv_2-5.js';
|
|
14
14
|
import { c as closeInspector } from '../vendor/inspector.hPQncR7V.js';
|
|
15
15
|
import 'chai';
|
|
16
16
|
import 'pathe';
|
|
@@ -18,13 +18,13 @@ import '../path.js';
|
|
|
18
18
|
import 'node:url';
|
|
19
19
|
import '../vendor/rpc.BGx7q_k2.js';
|
|
20
20
|
import '../vendor/index.BpSiYbpB.js';
|
|
21
|
-
import '../vendor/benchmark.
|
|
21
|
+
import '../vendor/benchmark.B6pblCp2.js';
|
|
22
22
|
import '@vitest/runner/utils';
|
|
23
|
-
import '../vendor/index.
|
|
24
|
-
import '../vendor/env.
|
|
23
|
+
import '../vendor/index.BJmtb_7W.js';
|
|
24
|
+
import '../vendor/env.2ltrQNq0.js';
|
|
25
25
|
import 'std-env';
|
|
26
26
|
import '../vendor/run-once.Db8Hgq9X.js';
|
|
27
|
-
import '../vendor/vi.
|
|
27
|
+
import '../vendor/vi.DXACdGTu.js';
|
|
28
28
|
import '../vendor/_commonjsHelpers.BFTU3MAI.js';
|
|
29
29
|
import '@vitest/expect';
|
|
30
30
|
import '@vitest/snapshot';
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../vendor/base.
|
|
1
|
+
import { r as runBaseTests } from '../vendor/base.Cy97mmVC.js';
|
|
2
2
|
import { a as createThreadsRpcOptions } from '../vendor/utils.DkxLWvS1.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
4
|
import '../vendor/global.7bFbnyXl.js';
|
package/dist/workers/vmForks.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
2
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../vendor/utils.DkxLWvS1.js';
|
|
3
|
-
import { r as runVmTests } from '../vendor/vm.
|
|
3
|
+
import { r as runVmTests } from '../vendor/vm.D9wVR14y.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:vm';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'pathe';
|
|
8
|
-
import '../chunks/runtime-console.
|
|
8
|
+
import '../chunks/runtime-console.O41g23Zj.js';
|
|
9
9
|
import 'node:stream';
|
|
10
10
|
import 'node:console';
|
|
11
11
|
import 'node:path';
|
|
12
12
|
import '../vendor/date.W2xKR2qe.js';
|
|
13
13
|
import '@vitest/runner/utils';
|
|
14
14
|
import '../vendor/global.7bFbnyXl.js';
|
|
15
|
-
import '../vendor/env.
|
|
15
|
+
import '../vendor/env.2ltrQNq0.js';
|
|
16
16
|
import 'std-env';
|
|
17
17
|
import '../vendor/execute.T3gg2ZK6.js';
|
|
18
18
|
import 'node:fs';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { a as createThreadsRpcOptions } from '../vendor/utils.DkxLWvS1.js';
|
|
2
|
-
import { r as runVmTests } from '../vendor/vm.
|
|
2
|
+
import { r as runVmTests } from '../vendor/vm.D9wVR14y.js';
|
|
3
3
|
import '@vitest/utils';
|
|
4
4
|
import 'node:vm';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'pathe';
|
|
7
|
-
import '../chunks/runtime-console.
|
|
7
|
+
import '../chunks/runtime-console.O41g23Zj.js';
|
|
8
8
|
import 'node:stream';
|
|
9
9
|
import 'node:console';
|
|
10
10
|
import 'node:path';
|
|
11
11
|
import '../vendor/date.W2xKR2qe.js';
|
|
12
12
|
import '@vitest/runner/utils';
|
|
13
13
|
import '../vendor/global.7bFbnyXl.js';
|
|
14
|
-
import '../vendor/env.
|
|
14
|
+
import '../vendor/env.2ltrQNq0.js';
|
|
15
15
|
import 'std-env';
|
|
16
16
|
import '../vendor/execute.T3gg2ZK6.js';
|
|
17
17
|
import 'node:fs';
|
package/dist/workers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v8 from 'v8';
|
|
2
|
-
import { d as BirpcOptions, e as RuntimeRPC, f as ContextRPC, W as WorkerGlobalState, g as WorkerContext, R as ResolvedConfig } from './reporters-
|
|
2
|
+
import { d as BirpcOptions, e as RuntimeRPC, f as ContextRPC, W as WorkerGlobalState, g as WorkerContext, R as ResolvedConfig } from './reporters-Cd1vkLMZ.js';
|
|
3
3
|
import { Awaitable } from '@vitest/utils';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import '@vitest/runner';
|
package/dist/workers.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './vendor/utils.DkxLWvS1.js';
|
|
2
2
|
export { p as provideWorkerState } from './vendor/global.7bFbnyXl.js';
|
|
3
3
|
export { run as runVitestWorker } from './worker.js';
|
|
4
|
-
export { r as runVmTests } from './vendor/vm.
|
|
5
|
-
export { r as runBaseTests } from './vendor/base.
|
|
4
|
+
export { r as runVmTests } from './vendor/vm.D9wVR14y.js';
|
|
5
|
+
export { r as runBaseTests } from './vendor/base.Cy97mmVC.js';
|
|
6
6
|
import '@vitest/utils';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'tinypool';
|
|
@@ -17,12 +17,12 @@ import 'node:module';
|
|
|
17
17
|
import './vendor/rpc.BGx7q_k2.js';
|
|
18
18
|
import './vendor/index.BpSiYbpB.js';
|
|
19
19
|
import 'node:vm';
|
|
20
|
-
import './chunks/runtime-console.
|
|
20
|
+
import './chunks/runtime-console.O41g23Zj.js';
|
|
21
21
|
import 'node:stream';
|
|
22
22
|
import 'node:path';
|
|
23
23
|
import './vendor/date.W2xKR2qe.js';
|
|
24
24
|
import '@vitest/runner/utils';
|
|
25
|
-
import './vendor/env.
|
|
25
|
+
import './vendor/env.2ltrQNq0.js';
|
|
26
26
|
import 'std-env';
|
|
27
27
|
import './vendor/execute.T3gg2ZK6.js';
|
|
28
28
|
import 'vite-node/utils';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.12",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"@types/node": "^18.0.0 || >=20.0.0",
|
|
120
120
|
"happy-dom": "*",
|
|
121
121
|
"jsdom": "*",
|
|
122
|
-
"@vitest/browser": "2.0.0-beta.
|
|
123
|
-
"@vitest/ui": "2.0.0-beta.
|
|
122
|
+
"@vitest/browser": "2.0.0-beta.12",
|
|
123
|
+
"@vitest/ui": "2.0.0-beta.12"
|
|
124
124
|
},
|
|
125
125
|
"peerDependenciesMeta": {
|
|
126
126
|
"@edge-runtime/vm": {
|
|
@@ -155,12 +155,12 @@
|
|
|
155
155
|
"tinypool": "^1.0.0",
|
|
156
156
|
"vite": "^5.0.0",
|
|
157
157
|
"why-is-node-running": "^2.2.2",
|
|
158
|
-
"@vitest/expect": "2.0.0-beta.
|
|
159
|
-
"@vitest/
|
|
160
|
-
"@vitest/
|
|
161
|
-
"@vitest/
|
|
162
|
-
"vite-node": "2.0.0-beta.
|
|
163
|
-
"@vitest/
|
|
158
|
+
"@vitest/expect": "2.0.0-beta.12",
|
|
159
|
+
"@vitest/snapshot": "2.0.0-beta.12",
|
|
160
|
+
"@vitest/runner": "2.0.0-beta.12",
|
|
161
|
+
"@vitest/spy": "2.0.0-beta.12",
|
|
162
|
+
"vite-node": "2.0.0-beta.12",
|
|
163
|
+
"@vitest/utils": "2.0.0-beta.12"
|
|
164
164
|
},
|
|
165
165
|
"devDependencies": {
|
|
166
166
|
"@antfu/install-pkg": "0.3.1",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import 'std-env';
|
|
2
|
-
|
|
3
|
-
var _a;
|
|
4
|
-
const isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a = process.versions) == null ? void 0 : _a.deno) && !globalThis.window;
|
|
5
|
-
const isWindows = isNode && process.platform === "win32";
|
|
6
|
-
|
|
7
|
-
export { isWindows as a, isNode as i };
|