vitest 0.9.1 → 0.9.4
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/{chunk-api-setup.7290422e.js → chunk-api-setup.49283db8.js} +4 -4
- package/dist/{chunk-constants.e59013dc.js → chunk-constants.c8f1d38c.js} +1 -1
- package/dist/{chunk-defaults.9aa0ce42.js → chunk-defaults.43e746f3.js} +1 -1
- package/dist/{chunk-install-pkg.7dd40977.js → chunk-install-pkg.cbf3a38b.js} +1 -1
- package/dist/{chunk-integrations-globals.c040aaa9.js → chunk-integrations-globals.b4a20711.js} +5 -5
- package/dist/{chunk-runtime-chain.94cf66a4.js → chunk-runtime-chain.701cffd8.js} +6 -3
- package/dist/{chunk-runtime-mocker.7f4b1850.js → chunk-runtime-mocker.e802beae.js} +3 -3
- package/dist/{chunk-runtime-rpc.4b80b6bd.js → chunk-runtime-rpc.c47f2233.js} +1 -1
- package/dist/{chunk-utils-global.10dcdfa6.js → chunk-utils-global.a3293dce.js} +2 -2
- package/dist/{chunk-utils-timers.4800834c.js → chunk-utils-timers.b26e7c5c.js} +1 -1
- package/dist/{chunk-vite-node-externalize.6a2ab9c2.js → chunk-vite-node-externalize.1c19fc5e.js} +1392 -4063
- package/dist/{chunk-vite-node-utils.7f0053fb.js → chunk-vite-node-utils.b4debb0b.js} +1 -1
- package/dist/cli.js +9 -9
- package/dist/entry.js +6 -6
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -4
- package/dist/node.d.ts +1 -0
- package/dist/node.js +10 -10
- package/dist/{vendor-index.ee829ed6.js → vendor-index.13468339.js} +3 -3
- package/dist/{vendor-index.87b2fc14.js → vendor-index.bd255bc8.js} +8 -8
- package/dist/worker.js +5 -5
- package/package.json +11 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { builtinModules, createRequire } from 'module';
|
|
2
2
|
import { pathToFileURL, fileURLToPath as fileURLToPath$2, URL as URL$1 } from 'url';
|
|
3
3
|
import vm from 'vm';
|
|
4
|
-
import { l as isAbsolute$2, w as resolve, j as join$2, A as extname$2, k as dirname$2 } from './chunk-utils-global.
|
|
4
|
+
import { l as isAbsolute$2, w as resolve, j as join$2, A as extname$2, k as dirname$2 } from './chunk-utils-global.a3293dce.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import fs, { realpathSync, statSync, Stats, promises, existsSync } from 'fs';
|
|
7
7
|
import assert from 'assert';
|
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { e as c } from './chunk-utils-global.
|
|
3
|
-
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.
|
|
2
|
+
import { e as c } from './chunk-utils-global.a3293dce.js';
|
|
3
|
+
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.1c19fc5e.js';
|
|
4
4
|
import 'path';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
|
7
7
|
import 'buffer';
|
|
8
8
|
import 'child_process';
|
|
9
9
|
import 'process';
|
|
10
|
-
import './vendor-index.
|
|
10
|
+
import './vendor-index.bd255bc8.js';
|
|
11
11
|
import './vendor-_commonjsHelpers.34b404ce.js';
|
|
12
12
|
import 'fs';
|
|
13
13
|
import 'assert';
|
|
@@ -16,18 +16,18 @@ import 'util';
|
|
|
16
16
|
import 'url';
|
|
17
17
|
import 'os';
|
|
18
18
|
import 'vite';
|
|
19
|
-
import './chunk-constants.
|
|
20
|
-
import '
|
|
19
|
+
import './chunk-constants.c8f1d38c.js';
|
|
20
|
+
import 'readline';
|
|
21
|
+
import './chunk-vite-node-utils.b4debb0b.js';
|
|
21
22
|
import 'module';
|
|
22
23
|
import 'vm';
|
|
23
|
-
import './chunk-defaults.
|
|
24
|
+
import './chunk-defaults.43e746f3.js';
|
|
24
25
|
import 'perf_hooks';
|
|
25
|
-
import './chunk-utils-timers.
|
|
26
|
+
import './chunk-utils-timers.b26e7c5c.js';
|
|
26
27
|
import 'worker_threads';
|
|
27
28
|
import 'tinypool';
|
|
28
29
|
import './chunk-magic-string.d5e0e473.js';
|
|
29
|
-
import '
|
|
30
|
-
import './vendor-index.ee829ed6.js';
|
|
30
|
+
import './vendor-index.13468339.js';
|
|
31
31
|
|
|
32
32
|
function toArr(any) {
|
|
33
33
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
package/dist/entry.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import { g as getWorkerState, t as toArray, m as relative, D as partitionSuiteChildren, E as hasTests, q as hasFailed, p as getFullName, r as resetModules } from './chunk-utils-global.
|
|
2
|
+
import { g as getWorkerState, t as toArray, m as relative, D as partitionSuiteChildren, E as hasTests, q as hasFailed, p as getFullName, r as resetModules } from './chunk-utils-global.a3293dce.js';
|
|
3
3
|
import { Console } from 'console';
|
|
4
4
|
import { Writable } from 'stream';
|
|
5
5
|
import { importModule } from 'local-pkg';
|
|
6
|
-
import { r as resetRunOnceCounter, i as index, R as RealDate, c as clearContext, d as defaultSuite, s as setHooks, g as getHooks, a as context, b as getSnapshotClient, e as setState, f as getFn, h as getState, v as vi } from './chunk-runtime-chain.
|
|
7
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
8
|
-
import { c as clearTimeout, s as setTimeout, d as stringify } from './chunk-utils-timers.
|
|
9
|
-
import { t as takeCoverage } from './chunk-defaults.
|
|
6
|
+
import { r as resetRunOnceCounter, i as index, R as RealDate, c as clearContext, d as defaultSuite, s as setHooks, g as getHooks, a as context, b as getSnapshotClient, e as setState, f as getFn, h as getState, v as vi } from './chunk-runtime-chain.701cffd8.js';
|
|
7
|
+
import { r as rpc } from './chunk-runtime-rpc.c47f2233.js';
|
|
8
|
+
import { c as clearTimeout, s as setTimeout, d as stringify } from './chunk-utils-timers.b26e7c5c.js';
|
|
9
|
+
import { t as takeCoverage } from './chunk-defaults.43e746f3.js';
|
|
10
10
|
import { createHash } from 'crypto';
|
|
11
11
|
import { format } from 'util';
|
|
12
12
|
import 'path';
|
|
@@ -402,7 +402,7 @@ async function setupGlobalEnv(config) {
|
|
|
402
402
|
globalSetup = true;
|
|
403
403
|
setupConsoleLogSpy();
|
|
404
404
|
if (config.globals)
|
|
405
|
-
(await import('./chunk-integrations-globals.
|
|
405
|
+
(await import('./chunk-integrations-globals.b4a20711.js')).registerApiGlobally();
|
|
406
406
|
}
|
|
407
407
|
function setupDefines(defines) {
|
|
408
408
|
for (const key in defines)
|
package/dist/index.d.ts
CHANGED
|
@@ -345,6 +345,7 @@ declare class Vitest {
|
|
|
345
345
|
updateSnapshot(files?: string[]): Promise<void>;
|
|
346
346
|
log(...args: any[]): void;
|
|
347
347
|
error(...args: any[]): void;
|
|
348
|
+
clearScreen(): void;
|
|
348
349
|
private _rerunTimer;
|
|
349
350
|
private scheduleRerun;
|
|
350
351
|
private unregisterWatcher;
|
|
@@ -1500,6 +1501,7 @@ declare global {
|
|
|
1500
1501
|
lastReturnedWith<E>(value: E): void;
|
|
1501
1502
|
toHaveNthReturnedWith<E>(nthCall: number, value: E): void;
|
|
1502
1503
|
nthReturnedWith<E>(nthCall: number, value: E): void;
|
|
1504
|
+
toSatisfy<E>(matcher: (value: E) => boolean, message?: string): void;
|
|
1503
1505
|
}
|
|
1504
1506
|
type VitestAssertion<A, T> = {
|
|
1505
1507
|
[K in keyof A]: A[K] extends Chai.Assertion ? Assertion<T> : A[K] extends (...args: any[]) => any ? A[K] : VitestAssertion<A[K], T>;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { p as afterAll, u as afterEach, o as beforeAll, q as beforeEach, k as describe, w as expect, y as getRunningMode, n as isFirstRun, z as isWatchMode, l as it, m as runOnce, j as suite, t as test, v as vi, x as vitest } from './chunk-runtime-chain.
|
|
1
|
+
export { p as afterAll, u as afterEach, o as beforeAll, q as beforeEach, k as describe, w as expect, y as getRunningMode, n as isFirstRun, z as isWatchMode, l as it, m as runOnce, j as suite, t as test, v as vi, x as vitest } from './chunk-runtime-chain.701cffd8.js';
|
|
2
2
|
export { assert, default as chai, should } from 'chai';
|
|
3
3
|
import 'util';
|
|
4
|
-
import './chunk-utils-global.
|
|
4
|
+
import './chunk-utils-global.a3293dce.js';
|
|
5
5
|
import 'path';
|
|
6
6
|
import 'tty';
|
|
7
7
|
import 'local-pkg';
|
|
8
|
-
import './chunk-utils-timers.
|
|
8
|
+
import './chunk-utils-timers.b26e7c5c.js';
|
|
9
9
|
import './vendor-_commonjsHelpers.34b404ce.js';
|
|
10
|
-
import './chunk-runtime-rpc.
|
|
10
|
+
import './chunk-runtime-rpc.c47f2233.js';
|
|
11
11
|
import 'fs';
|
|
12
12
|
import './spy.js';
|
|
13
13
|
import 'tinyspy';
|
package/dist/node.d.ts
CHANGED
package/dist/node.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.
|
|
2
|
-
export { V as VitestRunner } from './chunk-runtime-mocker.
|
|
1
|
+
export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.1c19fc5e.js';
|
|
2
|
+
export { V as VitestRunner } from './chunk-runtime-mocker.e802beae.js';
|
|
3
3
|
import 'buffer';
|
|
4
4
|
import 'path';
|
|
5
5
|
import 'child_process';
|
|
6
6
|
import 'process';
|
|
7
|
-
import './vendor-index.
|
|
7
|
+
import './vendor-index.bd255bc8.js';
|
|
8
8
|
import './vendor-_commonjsHelpers.34b404ce.js';
|
|
9
9
|
import 'fs';
|
|
10
10
|
import 'assert';
|
|
@@ -13,19 +13,19 @@ import 'stream';
|
|
|
13
13
|
import 'util';
|
|
14
14
|
import 'url';
|
|
15
15
|
import 'os';
|
|
16
|
-
import './chunk-utils-global.
|
|
16
|
+
import './chunk-utils-global.a3293dce.js';
|
|
17
17
|
import 'tty';
|
|
18
18
|
import 'local-pkg';
|
|
19
19
|
import 'vite';
|
|
20
|
-
import './chunk-constants.
|
|
21
|
-
import '
|
|
20
|
+
import './chunk-constants.c8f1d38c.js';
|
|
21
|
+
import 'readline';
|
|
22
|
+
import './chunk-vite-node-utils.b4debb0b.js';
|
|
22
23
|
import 'module';
|
|
23
24
|
import 'vm';
|
|
24
|
-
import './chunk-defaults.
|
|
25
|
+
import './chunk-defaults.43e746f3.js';
|
|
25
26
|
import 'perf_hooks';
|
|
26
|
-
import './chunk-utils-timers.
|
|
27
|
+
import './chunk-utils-timers.b26e7c5c.js';
|
|
27
28
|
import 'worker_threads';
|
|
28
29
|
import 'tinypool';
|
|
29
30
|
import './chunk-magic-string.d5e0e473.js';
|
|
30
|
-
import '
|
|
31
|
-
import './vendor-index.ee829ed6.js';
|
|
31
|
+
import './vendor-index.13468339.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import readline$2 from 'readline';
|
|
2
2
|
import require$$2 from 'events';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -404,7 +404,7 @@ var util$1 = {
|
|
|
404
404
|
entriesToDisplay: entriesToDisplay$7
|
|
405
405
|
};
|
|
406
406
|
|
|
407
|
-
const readline$1 =
|
|
407
|
+
const readline$1 = readline$2;
|
|
408
408
|
|
|
409
409
|
const _require$9 = util$1,
|
|
410
410
|
action$2 = _require$9.action;
|
|
@@ -3283,7 +3283,7 @@ var util = {
|
|
|
3283
3283
|
entriesToDisplay: entriesToDisplay$3
|
|
3284
3284
|
};
|
|
3285
3285
|
|
|
3286
|
-
const readline =
|
|
3286
|
+
const readline = readline$2;
|
|
3287
3287
|
const { action } = util;
|
|
3288
3288
|
const EventEmitter = require$$2;
|
|
3289
3289
|
const { beep, cursor: cursor$9 } = src;
|
|
@@ -623,7 +623,7 @@ crossSpawn$1.exports._enoent = enoent;
|
|
|
623
623
|
|
|
624
624
|
var crossSpawn = crossSpawn$1.exports;
|
|
625
625
|
|
|
626
|
-
var signalExit = {exports: {}};
|
|
626
|
+
var signalExit$1 = {exports: {}};
|
|
627
627
|
|
|
628
628
|
var signals$1 = {exports: {}};
|
|
629
629
|
|
|
@@ -704,7 +704,7 @@ const processOk = function (process) {
|
|
|
704
704
|
// some kind of non-node environment, just no-op
|
|
705
705
|
/* istanbul ignore if */
|
|
706
706
|
if (!processOk(process$1)) {
|
|
707
|
-
signalExit.exports = function () {
|
|
707
|
+
signalExit$1.exports = function () {
|
|
708
708
|
return function () {}
|
|
709
709
|
};
|
|
710
710
|
} else {
|
|
@@ -736,7 +736,7 @@ if (!processOk(process$1)) {
|
|
|
736
736
|
emitter.infinite = true;
|
|
737
737
|
}
|
|
738
738
|
|
|
739
|
-
signalExit.exports = function (cb, opts) {
|
|
739
|
+
signalExit$1.exports = function (cb, opts) {
|
|
740
740
|
/* istanbul ignore if */
|
|
741
741
|
if (!processOk(commonjsGlobal.process)) {
|
|
742
742
|
return function () {}
|
|
@@ -779,7 +779,7 @@ if (!processOk(process$1)) {
|
|
|
779
779
|
process$1.reallyExit = originalProcessReallyExit;
|
|
780
780
|
emitter.count -= 1;
|
|
781
781
|
};
|
|
782
|
-
signalExit.exports.unload = unload;
|
|
782
|
+
signalExit$1.exports.unload = unload;
|
|
783
783
|
|
|
784
784
|
var emit = function emit (event, code, signal) {
|
|
785
785
|
/* istanbul ignore if */
|
|
@@ -820,7 +820,7 @@ if (!processOk(process$1)) {
|
|
|
820
820
|
};
|
|
821
821
|
});
|
|
822
822
|
|
|
823
|
-
signalExit.exports.signals = function () {
|
|
823
|
+
signalExit$1.exports.signals = function () {
|
|
824
824
|
return signals
|
|
825
825
|
};
|
|
826
826
|
|
|
@@ -850,7 +850,7 @@ if (!processOk(process$1)) {
|
|
|
850
850
|
process$1.emit = processEmit;
|
|
851
851
|
process$1.reallyExit = processReallyExit;
|
|
852
852
|
};
|
|
853
|
-
signalExit.exports.load = load;
|
|
853
|
+
signalExit$1.exports.load = load;
|
|
854
854
|
|
|
855
855
|
var originalProcessReallyExit = process$1.reallyExit;
|
|
856
856
|
var processReallyExit = function processReallyExit (code) {
|
|
@@ -886,7 +886,7 @@ if (!processOk(process$1)) {
|
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
888
|
|
|
889
|
-
var
|
|
889
|
+
var signalExit = signalExit$1.exports;
|
|
890
890
|
|
|
891
891
|
var getStream$2 = {exports: {}};
|
|
892
892
|
|
|
@@ -1107,4 +1107,4 @@ onetime$2.exports.callCount = function_ => {
|
|
|
1107
1107
|
|
|
1108
1108
|
var onetime$1 = onetime$2.exports;
|
|
1109
1109
|
|
|
1110
|
-
export {
|
|
1110
|
+
export { signalExit$1 as a, getStream$2 as b, crossSpawn as c, crossSpawn$1 as d, onetime$2 as e, getStream$1 as g, mergeStream as m, onetime$1 as o, pathKey$1 as p, signalExit as s };
|
package/dist/worker.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { w as resolve, g as getWorkerState } from './chunk-utils-global.
|
|
2
|
-
import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-utils.
|
|
3
|
-
import { d as distDir } from './chunk-constants.
|
|
4
|
-
import { e as executeInViteNode } from './chunk-runtime-mocker.
|
|
5
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
1
|
+
import { w as resolve, g as getWorkerState } from './chunk-utils-global.a3293dce.js';
|
|
2
|
+
import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-utils.b4debb0b.js';
|
|
3
|
+
import { d as distDir } from './chunk-constants.c8f1d38c.js';
|
|
4
|
+
import { e as executeInViteNode } from './chunk-runtime-mocker.e802beae.js';
|
|
5
|
+
import { r as rpc } from './chunk-runtime-rpc.c47f2233.js';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'tty';
|
|
8
8
|
import 'local-pkg';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.4",
|
|
5
5
|
"description": "A blazing fast unit test framework powered by Vite",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"vite",
|
|
@@ -75,27 +75,27 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@types/chai": "^4.3.
|
|
78
|
+
"@types/chai": "^4.3.1",
|
|
79
79
|
"@types/chai-subset": "^1.3.3",
|
|
80
80
|
"chai": "^4.3.6",
|
|
81
81
|
"local-pkg": "^0.4.1",
|
|
82
82
|
"tinypool": "^0.1.2",
|
|
83
83
|
"tinyspy": "^0.3.2",
|
|
84
|
-
"vite": "^2.9.
|
|
84
|
+
"vite": "^2.9.5"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@antfu/install-pkg": "^0.1.0",
|
|
88
|
-
"@sinonjs/fake-timers": "^9.1.
|
|
88
|
+
"@sinonjs/fake-timers": "^9.1.2",
|
|
89
89
|
"@types/diff": "^5.0.2",
|
|
90
90
|
"@types/jsdom": "^16.2.14",
|
|
91
91
|
"@types/micromatch": "^4.0.2",
|
|
92
92
|
"@types/natural-compare": "^1.4.1",
|
|
93
|
-
"@types/node": "^17.0.
|
|
93
|
+
"@types/node": "^17.0.25",
|
|
94
94
|
"@types/prompts": "^2.4.0",
|
|
95
95
|
"@types/sinonjs__fake-timers": "^8.1.2",
|
|
96
|
-
"@vitest/ui": "0.9.
|
|
96
|
+
"@vitest/ui": "0.9.4",
|
|
97
97
|
"birpc": "^0.2.2",
|
|
98
|
-
"c8": "^7.11.
|
|
98
|
+
"c8": "^7.11.2",
|
|
99
99
|
"cac": "^6.7.12",
|
|
100
100
|
"chai-subset": "^1.6.0",
|
|
101
101
|
"cli-truncate": "^3.1.0",
|
|
@@ -106,21 +106,21 @@
|
|
|
106
106
|
"flatted": "^3.2.5",
|
|
107
107
|
"happy-dom": "^2.55.0",
|
|
108
108
|
"jsdom": "^19.0.0",
|
|
109
|
-
"log-update": "^5.0.
|
|
109
|
+
"log-update": "^5.0.1",
|
|
110
110
|
"magic-string": "^0.26.1",
|
|
111
111
|
"micromatch": "^4.0.5",
|
|
112
|
-
"mlly": "^0.5.
|
|
112
|
+
"mlly": "^0.5.2",
|
|
113
113
|
"natural-compare": "^1.4.0",
|
|
114
114
|
"pathe": "^0.2.0",
|
|
115
115
|
"picocolors": "^1.0.0",
|
|
116
116
|
"pkg-types": "^0.3.2",
|
|
117
117
|
"pretty-format": "^27.5.1",
|
|
118
118
|
"prompts": "^2.4.2",
|
|
119
|
-
"rollup": "^2.70.
|
|
119
|
+
"rollup": "^2.70.2",
|
|
120
120
|
"source-map-js": "^1.0.2",
|
|
121
121
|
"strip-ansi": "^7.0.1",
|
|
122
122
|
"typescript": "^4.6.3",
|
|
123
|
-
"vite-node": "0.9.
|
|
123
|
+
"vite-node": "0.9.4",
|
|
124
124
|
"ws": "^8.5.0"
|
|
125
125
|
},
|
|
126
126
|
"engines": {
|