vitest 2.1.4 → 2.2.0-beta.1
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 +11 -11
- package/dist/browser.js +1 -1
- package/dist/chunks/{base.C3xNdjV6.js → base.BS0HhLXd.js} +1 -1
- package/dist/chunks/{cac.DrfPaMvZ.js → cac.Z91LBqmg.js} +56 -7
- package/dist/chunks/{cli-api.CKrRYkw8.js → cli-api.DVJJMJHj.js} +123 -80
- package/dist/chunks/{config.Crbj2GAb.d.ts → config.CPguQ7J1.d.ts} +2 -2
- package/dist/chunks/{environment.LoooBwUu.d.ts → environment.CT0jpO-1.d.ts} +2 -1
- package/dist/chunks/{globals.Bp645TTJ.js → globals.BCGEw6ON.js} +2 -2
- package/dist/chunks/{index.D3d79vc8.js → index.BjjsHdBb.js} +1 -1
- package/dist/chunks/{index.Dqe5k2Rk.js → index.DD5eTY2y.js} +2 -8
- package/dist/chunks/{index.Bn81VaWg.js → index.DLRzErGF.js} +240 -318
- package/dist/chunks/{index.BMoXz_-n.js → index.K90BXFOx.js} +1 -1
- package/dist/chunks/{reporters.anwo7Y6a.d.ts → reporters.B_9uUTGW.d.ts} +148 -22
- package/dist/chunks/{resolveConfig.DPmbhVlP.js → resolveConfig.CQIc6fe7.js} +8 -4
- package/dist/chunks/{runBaseTests.Dm-659zB.js → runBaseTests.B7hcVT-s.js} +4 -4
- package/dist/chunks/{setup-common.DDmVKp6O.js → setup-common.BfGt8K-K.js} +4 -1
- package/dist/chunks/{utils.BB4zjzR8.js → utils.DNoFbBUZ.js} +6 -2
- package/dist/chunks/{vi.JMQoNY_Z.js → vi.BlPttogV.js} +91 -4
- package/dist/chunks/{vite.BdBj-UWY.d.ts → vite.Bvms8Xir.d.ts} +1 -1
- package/dist/chunks/{vm.jpyrB0xy.js → vm.Zr4qWzDJ.js} +3 -0
- package/dist/chunks/{worker.BAlI9hII.d.ts → worker.9VY11NZs.d.ts} +3 -2
- package/dist/chunks/{worker.DHnGaO2M.d.ts → worker.Qz1UB4Fv.d.ts} +1 -1
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +10 -9
- package/dist/coverage.d.ts +9 -112
- package/dist/coverage.js +1 -1
- package/dist/environments.d.ts +2 -2
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +4 -3
- package/dist/index.d.ts +39 -10
- package/dist/index.js +2 -2
- package/dist/node.d.ts +13 -11
- package/dist/node.js +7 -7
- package/dist/reporters.d.ts +10 -9
- package/dist/reporters.js +2 -2
- package/dist/runners.d.ts +3 -1
- package/dist/runners.js +4 -1
- package/dist/worker.js +6 -2
- package/dist/workers/forks.js +1 -1
- package/dist/workers/runVmTests.js +4 -4
- package/dist/workers/threads.js +1 -1
- package/dist/workers/vmForks.js +1 -1
- package/dist/workers/vmThreads.js +1 -1
- package/dist/workers.d.ts +5 -4
- package/dist/workers.js +4 -3
- package/package.json +15 -15
package/dist/browser.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as SerializedCoverageConfig, S as SerializedConfig } from './chunks/config.
|
|
1
|
+
import { b as CoverageProvider, c as CoverageProviderModule } from './chunks/reporters.B_9uUTGW.js';
|
|
2
|
+
import { a as SerializedCoverageConfig, S as SerializedConfig } from './chunks/config.CPguQ7J1.js';
|
|
3
3
|
import * as spy$1 from '@vitest/spy';
|
|
4
|
-
import
|
|
4
|
+
import * as _vitest_utils_diff from '@vitest/utils/diff';
|
|
5
5
|
import { VitestExecutor } from './execute.js';
|
|
6
6
|
export { collectTests, processError, startTests } from '@vitest/runner';
|
|
7
|
+
import './chunks/environment.CT0jpO-1.js';
|
|
8
|
+
import 'node:stream';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@vitest/utils';
|
|
7
11
|
import '@vitest/pretty-format';
|
|
8
12
|
import '@vitest/snapshot';
|
|
9
|
-
import 'vite';
|
|
10
13
|
import 'vite-node';
|
|
11
14
|
import 'chai';
|
|
12
|
-
import './chunks/environment.LoooBwUu.js';
|
|
13
|
-
import 'node:stream';
|
|
14
|
-
import '@vitest/utils';
|
|
15
15
|
import '@vitest/utils/source-map';
|
|
16
16
|
import 'vite-node/client';
|
|
17
17
|
import 'vite-node/server';
|
|
18
|
-
import '@vitest/snapshot/manager';
|
|
19
|
-
import 'node:fs';
|
|
20
18
|
import './chunks/benchmark.geERunq4.js';
|
|
21
19
|
import '@vitest/runner/utils';
|
|
22
20
|
import 'tinybench';
|
|
21
|
+
import '@vitest/snapshot/manager';
|
|
22
|
+
import 'node:fs';
|
|
23
23
|
import '@vitest/snapshot/environment';
|
|
24
|
-
import './chunks/worker.
|
|
24
|
+
import './chunks/worker.9VY11NZs.js';
|
|
25
25
|
import 'node:vm';
|
|
26
26
|
import '@vitest/mocker';
|
|
27
27
|
import './chunks/mocker.cRtM890J.js';
|
|
@@ -57,7 +57,7 @@ declare function takeCoverageInsideWorker(options: SerializedCoverageConfig | un
|
|
|
57
57
|
declare function stopCoverageInsideWorker(options: SerializedCoverageConfig | undefined, loader: Loader): Promise<unknown>;
|
|
58
58
|
|
|
59
59
|
declare function setupCommonEnv(config: SerializedConfig): Promise<void>;
|
|
60
|
-
declare function loadDiffConfig(config: SerializedConfig, executor: VitestExecutor): Promise<
|
|
60
|
+
declare function loadDiffConfig(config: SerializedConfig, executor: VitestExecutor): Promise<_vitest_utils_diff.SerializedDiffOptions | undefined>;
|
|
61
61
|
declare function loadSnapshotSerializers(config: SerializedConfig, executor: VitestExecutor): Promise<void>;
|
|
62
62
|
|
|
63
63
|
export { spy as SpyModule, getCoverageProvider, loadDiffConfig, loadSnapshotSerializers, setupCommonEnv, startCoverageInsideWorker, stopCoverageInsideWorker, takeCoverageInsideWorker };
|
package/dist/browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { g as getCoverageProvider, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/coverage.BoMDb1ip.js';
|
|
2
2
|
export { s as SpyModule } from './chunks/spy.Cf_4R5Oe.js';
|
|
3
|
-
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './chunks/setup-common.
|
|
3
|
+
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './chunks/setup-common.BfGt8K-K.js';
|
|
4
4
|
export { collectTests, processError, startTests } from '@vitest/runner';
|
|
5
5
|
import '@vitest/spy';
|
|
6
6
|
import '@vitest/snapshot';
|
|
@@ -24,7 +24,7 @@ async function runBaseTests(method, state) {
|
|
|
24
24
|
ctx.files.forEach((i) => state.moduleCache.delete(i));
|
|
25
25
|
const [executor, { run }] = await Promise.all([
|
|
26
26
|
startViteNode({ state, requestStubs: getDefaultRequestStubs() }),
|
|
27
|
-
import('./runBaseTests.
|
|
27
|
+
import('./runBaseTests.B7hcVT-s.js')
|
|
28
28
|
]);
|
|
29
29
|
await run(
|
|
30
30
|
method,
|
|
@@ -618,7 +618,7 @@ class CAC extends EventEmitter {
|
|
|
618
618
|
|
|
619
619
|
const cac = (name = "") => new CAC(name);
|
|
620
620
|
|
|
621
|
-
var version = "2.1
|
|
621
|
+
var version = "2.2.0-beta.1";
|
|
622
622
|
|
|
623
623
|
const apiConfig = (port) => ({
|
|
624
624
|
port: {
|
|
@@ -1121,9 +1121,58 @@ const cliOptionsConfig = {
|
|
|
1121
1121
|
argument: "<times>"
|
|
1122
1122
|
},
|
|
1123
1123
|
diff: {
|
|
1124
|
-
description: "
|
|
1124
|
+
description: "DiffOptions object or a path to a module which exports DiffOptions object",
|
|
1125
1125
|
argument: "<path>",
|
|
1126
|
-
|
|
1126
|
+
subcommands: {
|
|
1127
|
+
aAnnotation: {
|
|
1128
|
+
description: "Annotation for expected lines (default: `Expected`)",
|
|
1129
|
+
argument: "<annotation>"
|
|
1130
|
+
},
|
|
1131
|
+
aIndicator: {
|
|
1132
|
+
description: "Indicator for expected lines (default: `-`)",
|
|
1133
|
+
argument: "<indicator>"
|
|
1134
|
+
},
|
|
1135
|
+
bAnnotation: {
|
|
1136
|
+
description: "Annotation for received lines (default: `Received`)",
|
|
1137
|
+
argument: "<annotation>"
|
|
1138
|
+
},
|
|
1139
|
+
bIndicator: {
|
|
1140
|
+
description: "Indicator for received lines (default: `+`)",
|
|
1141
|
+
argument: "<indicator>"
|
|
1142
|
+
},
|
|
1143
|
+
commonIndicator: {
|
|
1144
|
+
description: "Indicator for common lines (default: ` `)",
|
|
1145
|
+
argument: "<indicator>"
|
|
1146
|
+
},
|
|
1147
|
+
contextLines: {
|
|
1148
|
+
description: "Number of lines of context to show around each change (default: `5`)",
|
|
1149
|
+
argument: "<lines>"
|
|
1150
|
+
},
|
|
1151
|
+
emptyFirstOrLastLinePlaceholder: {
|
|
1152
|
+
description: 'Placeholder for an empty first or last line (default: `""`)',
|
|
1153
|
+
argument: "<placeholder>"
|
|
1154
|
+
},
|
|
1155
|
+
expand: {
|
|
1156
|
+
description: "Expand all common lines (default: `true`)"
|
|
1157
|
+
},
|
|
1158
|
+
includeChangeCounts: {
|
|
1159
|
+
description: "Include comparison counts in diff output (default: `false`)"
|
|
1160
|
+
},
|
|
1161
|
+
omitAnnotationLines: {
|
|
1162
|
+
description: "Omit annotation lines from the output (default: `false`)"
|
|
1163
|
+
},
|
|
1164
|
+
printBasicPrototype: {
|
|
1165
|
+
description: "Print basic prototype Object and Array (default: `true`)"
|
|
1166
|
+
},
|
|
1167
|
+
truncateThreshold: {
|
|
1168
|
+
description: "Number of lines to show before and after each change (default: `0`)",
|
|
1169
|
+
argument: "<threshold>"
|
|
1170
|
+
},
|
|
1171
|
+
truncateAnnotation: {
|
|
1172
|
+
description: "Annotation for truncated lines (default: `... Diff result is truncated`)",
|
|
1173
|
+
argument: "<annotation>"
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1127
1176
|
},
|
|
1128
1177
|
exclude: {
|
|
1129
1178
|
description: "Additional file globs to be excluded from test",
|
|
@@ -1502,13 +1551,13 @@ async function start(mode, cliFilters, options) {
|
|
|
1502
1551
|
} catch {
|
|
1503
1552
|
}
|
|
1504
1553
|
try {
|
|
1505
|
-
const { startVitest } = await import('./cli-api.
|
|
1554
|
+
const { startVitest } = await import('./cli-api.DVJJMJHj.js').then(function (n) { return n.e; });
|
|
1506
1555
|
const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(options));
|
|
1507
1556
|
if (!ctx?.shouldKeepServer()) {
|
|
1508
1557
|
await ctx?.exit();
|
|
1509
1558
|
}
|
|
1510
1559
|
} catch (e) {
|
|
1511
|
-
const { divider } = await import('./utils.
|
|
1560
|
+
const { divider } = await import('./utils.DNoFbBUZ.js').then(function (n) { return n.u; });
|
|
1512
1561
|
console.error(`
|
|
1513
1562
|
${c.red(divider(c.bold(c.inverse(" Startup Error "))))}`);
|
|
1514
1563
|
console.error(e);
|
|
@@ -1533,7 +1582,7 @@ async function collect(mode, cliFilters, options) {
|
|
|
1533
1582
|
} catch {
|
|
1534
1583
|
}
|
|
1535
1584
|
try {
|
|
1536
|
-
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.
|
|
1585
|
+
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.DVJJMJHj.js').then(function (n) { return n.e; });
|
|
1537
1586
|
const ctx = await prepareVitest(mode, {
|
|
1538
1587
|
...normalizeCliOptions(options),
|
|
1539
1588
|
watch: false,
|
|
@@ -1555,7 +1604,7 @@ async function collect(mode, cliFilters, options) {
|
|
|
1555
1604
|
}
|
|
1556
1605
|
await ctx.close();
|
|
1557
1606
|
} catch (e) {
|
|
1558
|
-
const { divider } = await import('./utils.
|
|
1607
|
+
const { divider } = await import('./utils.DNoFbBUZ.js').then(function (n) { return n.u; });
|
|
1559
1608
|
console.error(`
|
|
1560
1609
|
${c.red(divider(c.bold(c.inverse(" Collect Error "))))}`);
|
|
1561
1610
|
console.error(e);
|