vitest 2.1.5 → 2.2.0-beta.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/LICENSE.md +0 -75
- package/dist/browser.d.ts +11 -11
- package/dist/browser.js +1 -1
- package/dist/chunks/{RandomSequencer.CMRlh2v4.js → RandomSequencer.BPedXEug.js} +1 -0
- package/dist/chunks/{base.BZZh4cSm.js → base.BS0HhLXd.js} +1 -1
- package/dist/chunks/{benchmark.geERunq4.d.ts → benchmark.CFFwLv-O.d.ts} +2 -2
- package/dist/chunks/{cac.DWAW3Uh5.js → cac.Cs06pOqp.js} +56 -7
- package/dist/chunks/{cli-api.BtqJwSCh.js → cli-api.CB-jIbYQ.js} +585 -407
- package/dist/chunks/{config.Cy0C388Z.d.ts → config.CPguQ7J1.d.ts} +2 -1
- package/dist/chunks/{environment.LoooBwUu.d.ts → environment.CT0jpO-1.d.ts} +2 -1
- package/dist/chunks/{globals.D8ZVAdXd.js → globals.BCGEw6ON.js} +2 -2
- package/dist/chunks/{index.nEwtF0bu.js → index.BjjsHdBb.js} +1 -1
- package/dist/chunks/{index.ckWaX2gY.js → index.DD5eTY2y.js} +2 -8
- package/dist/chunks/{index.DsZFoqi9.js → index.bzFpKeaq.js} +601 -807
- package/dist/chunks/{reporters.D7Jzd9GS.d.ts → reporters.F9D2idOT.d.ts} +1429 -1286
- package/dist/chunks/{resolveConfig.RxKrDli4.js → resolveConfig.CLnvCvEs.js} +11 -9
- package/dist/chunks/{runBaseTests.3qpJUEJM.js → runBaseTests.B7hcVT-s.js} +4 -4
- package/dist/chunks/{setup-common.Dj6BZI3u.js → setup-common.BfGt8K-K.js} +4 -1
- package/dist/chunks/{suite.B2jumIFP.d.ts → suite.BJU7kdY9.d.ts} +4 -4
- package/dist/chunks/{utils.DNoFbBUZ.js → utils.DJONn5B5.js} +15 -21
- package/dist/chunks/{vi.DgezovHB.js → vi.BlPttogV.js} +6 -1
- package/dist/chunks/{vite.C-N5BBZe.d.ts → vite.DonA4fvH.d.ts} +1 -1
- package/dist/chunks/{worker.tN5KGIih.d.ts → worker.9VY11NZs.d.ts} +2 -2
- package/dist/chunks/{worker.B9FxPCaC.d.ts → worker.Qz1UB4Fv.d.ts} +1 -1
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +13 -11
- package/dist/coverage.d.ts +9 -112
- package/dist/coverage.js +2 -2
- package/dist/environments.d.ts +2 -2
- package/dist/execute.d.ts +4 -3
- package/dist/index.d.ts +14 -13
- package/dist/index.js +2 -2
- package/dist/node.d.ts +26 -15
- package/dist/node.js +9 -9
- package/dist/reporters.d.ts +9 -8
- package/dist/reporters.js +4 -5
- package/dist/runners.d.ts +5 -3
- package/dist/runners.js +4 -1
- package/dist/suite.d.ts +2 -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.d.ts +5 -4
- package/dist/workers.js +1 -1
- package/package.json +13 -12
|
@@ -2,6 +2,7 @@ import { PrettyFormatOptions } from '@vitest/pretty-format';
|
|
|
2
2
|
import { SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
3
3
|
import { SnapshotUpdateState } from '@vitest/snapshot';
|
|
4
4
|
import { SnapshotEnvironment } from '@vitest/snapshot/environment';
|
|
5
|
+
import { SerializedDiffOptions } from '@vitest/utils/diff';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Names of clock methods that may be faked by install.
|
|
@@ -154,7 +155,7 @@ interface SerializedConfig {
|
|
|
154
155
|
showDiff?: boolean;
|
|
155
156
|
truncateThreshold?: number;
|
|
156
157
|
} | undefined;
|
|
157
|
-
diff: string | undefined;
|
|
158
|
+
diff: string | SerializedDiffOptions | undefined;
|
|
158
159
|
retry: number;
|
|
159
160
|
includeTaskLocation: boolean | undefined;
|
|
160
161
|
inspect: boolean | string | undefined;
|
|
@@ -36,6 +36,7 @@ interface ModuleGraphData {
|
|
|
36
36
|
inlined: string[];
|
|
37
37
|
}
|
|
38
38
|
type OnServerRestartHandler = (reason?: string) => Promise<void> | void;
|
|
39
|
+
type OnTestsRerunHandler = (testFiles: string[]) => Promise<void> | void;
|
|
39
40
|
interface ProvidedContext {
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -171,4 +172,4 @@ interface ResolvedTestEnvironment {
|
|
|
171
172
|
options: Record<string, any> | null;
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
export type { AfterSuiteRunMeta as A, Constructable as C, Environment as E, HappyDOMOptions as H, JSDOMOptions as J, ModuleGraphData as M, Nullable as N, OnServerRestartHandler as O, ProvidedContext as P, ResolvedTestEnvironment as R, TransformMode as T, UserConsoleLog as U, VmEnvironmentReturn as V, EnvironmentReturn as a, Awaitable as b, Arrayable as c, ArgumentsType as d, MutableArray as e, EnvironmentOptions as f, ModuleCache as g };
|
|
175
|
+
export type { AfterSuiteRunMeta as A, Constructable as C, Environment as E, HappyDOMOptions as H, JSDOMOptions as J, ModuleGraphData as M, Nullable as N, OnServerRestartHandler as O, ProvidedContext as P, ResolvedTestEnvironment as R, TransformMode as T, UserConsoleLog as U, VmEnvironmentReturn as V, EnvironmentReturn as a, Awaitable as b, Arrayable as c, ArgumentsType as d, MutableArray as e, EnvironmentOptions as f, ModuleCache as g, OnTestsRerunHandler as h };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as globalApis } from './constants.fzPh7AOq.js';
|
|
2
|
-
import { V as VitestIndex } from './index.
|
|
3
|
-
import './vi.
|
|
2
|
+
import { V as VitestIndex } from './index.DD5eTY2y.js';
|
|
3
|
+
import './vi.BlPttogV.js';
|
|
4
4
|
import '@vitest/expect';
|
|
5
5
|
import '@vitest/runner';
|
|
6
6
|
import '@vitest/runner/utils';
|
|
@@ -3,7 +3,7 @@ import { resolve } from 'node:path';
|
|
|
3
3
|
import { t as takeCoverageInsideWorker } from './coverage.BoMDb1ip.js';
|
|
4
4
|
import { distDir } from '../path.js';
|
|
5
5
|
import { r as rpc } from './rpc.C3q9uwRX.js';
|
|
6
|
-
import { l as loadDiffConfig, a as loadSnapshotSerializers } from './setup-common.
|
|
6
|
+
import { l as loadDiffConfig, a as loadSnapshotSerializers } from './setup-common.BfGt8K-K.js';
|
|
7
7
|
import { g as getWorkerState } from './utils.C8RiOc4B.js';
|
|
8
8
|
|
|
9
9
|
function setupChaiConfig(config) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.
|
|
2
|
-
import { g as getWorkerState } from './utils.C8RiOc4B.js';
|
|
1
|
+
import { c as createExpect, a as globalExpect, i as inject, v as vi, b as vitest } from './vi.BlPttogV.js';
|
|
3
2
|
import { i as isFirstRun, a as runOnce } from './run-once.2ogXb3JV.js';
|
|
4
3
|
import { b as bench } from './benchmark.Cdu9hjj4.js';
|
|
5
4
|
import { expectTypeOf } from 'expect-type';
|
|
@@ -7,11 +6,6 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed,
|
|
|
7
6
|
import * as chai from 'chai';
|
|
8
7
|
import { assert, should } from 'chai';
|
|
9
8
|
|
|
10
|
-
function inject(key) {
|
|
11
|
-
const workerState = getWorkerState();
|
|
12
|
-
return workerState.providedContext[key];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
function getRunningMode() {
|
|
16
10
|
return process.env.VITEST_MODE === "WATCH" ? "watch" : "run";
|
|
17
11
|
}
|
|
@@ -51,4 +45,4 @@ var VitestIndex = /*#__PURE__*/Object.freeze({
|
|
|
51
45
|
vitest: vitest
|
|
52
46
|
});
|
|
53
47
|
|
|
54
|
-
export { VitestIndex as V,
|
|
48
|
+
export { VitestIndex as V, assertType as a, getRunningMode as g, isWatchMode as i };
|