vitest 0.34.0 → 0.34.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 +28 -0
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +1 -1
- package/dist/child.js +11 -6
- package/dist/{chunk-api-setup.644415c3.js → chunk-api-setup.cc5282f7.js} +25 -15
- package/dist/{chunk-install-pkg.dd70081b.js → chunk-install-pkg.7e19b3a0.js} +6 -3
- package/dist/{chunk-integrations-globals.877c84db.js → chunk-integrations-globals.522ae1ae.js} +4 -3
- package/dist/cli.js +6 -3
- package/dist/config.d.ts +1 -1
- package/dist/coverage.d.ts +1 -1
- package/dist/entry-vm.js +4 -3
- package/dist/entry.js +4 -3
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +11 -2
- package/dist/execute.d.ts +139 -0
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.js +5 -4
- package/dist/loader.js +9 -528
- package/dist/node.d.ts +2 -2
- package/dist/node.js +6 -3
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +3 -2
- package/dist/{types-3c7dbfa5.d.ts → types-63abf2e0.d.ts} +63 -2
- package/dist/{vendor-environments.443ecd82.js → vendor-environments.37f266a9.js} +13 -6
- package/dist/{vendor-execute.9ab1c1a7.js → vendor-execute.4fc8203a.js} +409 -206
- package/dist/vendor-index.0b5b3600.js +2062 -0
- package/dist/{vendor-index.eff408fd.js → vendor-index.b5efbd68.js} +1 -1
- package/dist/{vendor-node.00226ab1.js → vendor-node.7b1bd3c5.js} +196 -122
- package/dist/vendor-tasks.f9d75aed.js +14 -0
- package/dist/{vendor-vi.271667ef.js → vendor-vi.f8055ff2.js} +2 -1
- package/dist/vm.js +14 -6
- package/dist/worker.js +12 -6
- package/package.json +7 -7
- package/dist/vendor-source-map.e6c1997b.js +0 -747
|
@@ -7,8 +7,9 @@ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './vendor-_com
|
|
|
7
7
|
import { equals, iterableEquality, subsetEquality, JestExtend, JestChaiExpect, JestAsymmetricMatchers, GLOBAL_EXPECT as GLOBAL_EXPECT$1, getState, setState } from '@vitest/expect';
|
|
8
8
|
import { SnapshotClient, stripSnapshotIndentation, addSerializer } from '@vitest/snapshot';
|
|
9
9
|
import '@vitest/utils/error';
|
|
10
|
-
import { g as getFullName
|
|
10
|
+
import { g as getFullName } from './vendor-tasks.f9d75aed.js';
|
|
11
11
|
import { g as getWorkerState, a as getCurrentEnvironment } from './vendor-global.97e4527c.js';
|
|
12
|
+
import { parseSingleStack } from '@vitest/utils/source-map';
|
|
12
13
|
import require$$2 from 'util';
|
|
13
14
|
import { R as RealDate, r as resetDate, m as mockDate } from './vendor-date.6e993429.js';
|
|
14
15
|
import { spyOn, fn, isMockFunction, spies } from '@vitest/spy';
|
package/dist/vm.js
CHANGED
|
@@ -7,20 +7,26 @@ import { c as createBirpc } from './vendor-index.b271ebe4.js';
|
|
|
7
7
|
import { resolve } from 'pathe';
|
|
8
8
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
9
9
|
import { d as distDir } from './vendor-paths.84fc7a99.js';
|
|
10
|
-
import { l as loadEnvironment } from './vendor-environments.
|
|
11
|
-
import { b as startVitestExecutor } from './vendor-execute.
|
|
10
|
+
import { l as loadEnvironment } from './vendor-environments.37f266a9.js';
|
|
11
|
+
import { b as startVitestExecutor } from './vendor-execute.4fc8203a.js';
|
|
12
12
|
import { createCustomConsole } from './chunk-runtime-console.ea222ffb.js';
|
|
13
13
|
import { c as createSafeRpc } from './vendor-rpc.cbd8e972.js';
|
|
14
|
-
import '
|
|
14
|
+
import './vendor-index.0b5b3600.js';
|
|
15
|
+
import 'acorn';
|
|
16
|
+
import 'node:module';
|
|
17
|
+
import 'node:fs';
|
|
18
|
+
import 'node:assert';
|
|
19
|
+
import 'node:process';
|
|
20
|
+
import 'node:path';
|
|
21
|
+
import 'node:v8';
|
|
22
|
+
import 'node:util';
|
|
15
23
|
import 'node:console';
|
|
24
|
+
import 'local-pkg';
|
|
16
25
|
import 'vite-node/utils';
|
|
17
26
|
import '@vitest/utils/error';
|
|
18
27
|
import './vendor-global.97e4527c.js';
|
|
19
|
-
import 'node:fs';
|
|
20
28
|
import '@vitest/utils';
|
|
21
29
|
import './vendor-base.9c08bbd0.js';
|
|
22
|
-
import 'node:path';
|
|
23
|
-
import 'node:module';
|
|
24
30
|
import 'vite-node/constants';
|
|
25
31
|
import 'node:stream';
|
|
26
32
|
import './vendor-date.6e993429.js';
|
|
@@ -88,6 +94,8 @@ async function run(ctx) {
|
|
|
88
94
|
context.process = process;
|
|
89
95
|
context.global = context;
|
|
90
96
|
context.console = createCustomConsole(state);
|
|
97
|
+
context.setImmediate = setImmediate;
|
|
98
|
+
context.clearImmediate = clearImmediate;
|
|
91
99
|
if (ctx.invalidates) {
|
|
92
100
|
ctx.invalidates.forEach((fsPath) => {
|
|
93
101
|
moduleCache.delete(fsPath);
|
package/dist/worker.js
CHANGED
|
@@ -2,24 +2,30 @@ import { performance } from 'node:perf_hooks';
|
|
|
2
2
|
import { c as createBirpc } from './vendor-index.b271ebe4.js';
|
|
3
3
|
import { workerId } from 'tinypool';
|
|
4
4
|
import { g as getWorkerState } from './vendor-global.97e4527c.js';
|
|
5
|
-
import { l as loadEnvironment } from './vendor-environments.
|
|
6
|
-
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.
|
|
5
|
+
import { l as loadEnvironment } from './vendor-environments.37f266a9.js';
|
|
6
|
+
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.4fc8203a.js';
|
|
7
7
|
import { s as setupInspect } from './vendor-inspector.47fc8cbb.js';
|
|
8
8
|
import { r as rpcDone, c as createSafeRpc } from './vendor-rpc.cbd8e972.js';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'pathe';
|
|
11
|
-
import '
|
|
11
|
+
import './vendor-index.0b5b3600.js';
|
|
12
|
+
import 'acorn';
|
|
13
|
+
import 'node:module';
|
|
14
|
+
import 'node:fs';
|
|
15
|
+
import 'node:assert';
|
|
16
|
+
import 'node:process';
|
|
17
|
+
import 'node:path';
|
|
18
|
+
import 'node:v8';
|
|
19
|
+
import 'node:util';
|
|
12
20
|
import 'node:console';
|
|
21
|
+
import 'local-pkg';
|
|
13
22
|
import 'node:vm';
|
|
14
23
|
import 'vite-node/client';
|
|
15
24
|
import 'vite-node/utils';
|
|
16
25
|
import '@vitest/utils/error';
|
|
17
26
|
import './vendor-paths.84fc7a99.js';
|
|
18
|
-
import 'node:fs';
|
|
19
27
|
import '@vitest/utils';
|
|
20
28
|
import './vendor-base.9c08bbd0.js';
|
|
21
|
-
import 'node:path';
|
|
22
|
-
import 'node:module';
|
|
23
29
|
import 'vite-node/constants';
|
|
24
30
|
|
|
25
31
|
async function init(ctx) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.34.
|
|
4
|
+
"version": "0.34.2",
|
|
5
5
|
"description": "A blazing fast unit test framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -151,12 +151,12 @@
|
|
|
151
151
|
"tinypool": "^0.7.0",
|
|
152
152
|
"vite": "^3.0.0 || ^4.0.0",
|
|
153
153
|
"why-is-node-running": "^2.2.2",
|
|
154
|
-
"@vitest/runner": "0.34.
|
|
155
|
-
"@vitest/utils": "0.34.
|
|
156
|
-
"vite-node": "0.34.
|
|
157
|
-
"@vitest/
|
|
158
|
-
"@vitest/spy": "0.34.
|
|
159
|
-
"@vitest/
|
|
154
|
+
"@vitest/runner": "0.34.2",
|
|
155
|
+
"@vitest/utils": "0.34.2",
|
|
156
|
+
"vite-node": "0.34.2",
|
|
157
|
+
"@vitest/expect": "0.34.2",
|
|
158
|
+
"@vitest/spy": "0.34.2",
|
|
159
|
+
"@vitest/snapshot": "0.34.2"
|
|
160
160
|
},
|
|
161
161
|
"devDependencies": {
|
|
162
162
|
"@ampproject/remapping": "^2.2.1",
|