vitest 0.0.128 → 0.0.129
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/cli.js +10 -10
- package/dist/{constants-2cd49e0a.js → constants-868b9a2e.js} +2 -2
- package/dist/{diff-711cddf1.js → diff-be830986.js} +1 -1
- package/dist/entry.js +5 -5
- package/dist/{global-60f865bb.js → global-0254dd68.js} +4 -4
- package/dist/{index-de2249ec.js → index-06712022.js} +1 -1
- package/dist/{index-f0488a5d.js → index-42a3a132.js} +2 -2
- package/dist/{index-26cb6e63.js → index-42d44ee5.js} +2 -2
- package/dist/{index-fa899e66.js → index-93dcb598.js} +0 -0
- package/dist/{index-e909c175.js → index-a73f33e0.js} +0 -0
- package/dist/{index-7975be53.js → index-cb02ee01.js} +0 -0
- package/dist/{index-4cd25949.js → index-cce5de77.js} +0 -0
- package/dist/{index-05648ba5.js → index-d30b5ed0.js} +869 -719
- package/dist/index.d.ts +18 -17
- package/dist/index.js +3 -3
- package/dist/{magic-string.es-94000aea.js → magic-string.es-98a8bfa0.js} +0 -0
- package/dist/node.d.ts +17 -16
- package/dist/node.js +8 -8
- package/dist/{setup-3d1395ff.js → setup-6e09a65a.js} +4 -4
- package/dist/{vi-02a9c349.js → vi-fe26a646.js} +1 -1
- package/dist/worker.js +3 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -4,11 +4,11 @@ import { Buffer } from 'buffer';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import childProcess from 'child_process';
|
|
6
6
|
import process$1 from 'process';
|
|
7
|
-
import { m as mergeStream, g as getStream, c as crossSpawn } from './index-
|
|
7
|
+
import { m as mergeStream, g as getStream, c as crossSpawn } from './index-cce5de77.js';
|
|
8
8
|
import require$$0, { constants } from 'os';
|
|
9
|
-
import { s as signalExit } from './index-
|
|
10
|
-
import { e as ensurePackageInstalled } from './index-
|
|
11
|
-
import { c as createVitest } from './index-
|
|
9
|
+
import { s as signalExit } from './index-cb02ee01.js';
|
|
10
|
+
import { e as ensurePackageInstalled } from './index-42a3a132.js';
|
|
11
|
+
import { c as createVitest } from './index-d30b5ed0.js';
|
|
12
12
|
import './_commonjsHelpers-c9e3b764.js';
|
|
13
13
|
import 'fs';
|
|
14
14
|
import 'stream';
|
|
@@ -18,14 +18,14 @@ import 'url';
|
|
|
18
18
|
import 'tty';
|
|
19
19
|
import 'local-pkg';
|
|
20
20
|
import 'vite';
|
|
21
|
-
import './constants-
|
|
22
|
-
import './magic-string.es-
|
|
21
|
+
import './constants-868b9a2e.js';
|
|
22
|
+
import './magic-string.es-98a8bfa0.js';
|
|
23
23
|
import 'perf_hooks';
|
|
24
|
-
import './diff-
|
|
24
|
+
import './diff-be830986.js';
|
|
25
25
|
import 'module';
|
|
26
26
|
import 'worker_threads';
|
|
27
27
|
import 'tinypool';
|
|
28
|
-
import './index-
|
|
28
|
+
import './index-a73f33e0.js';
|
|
29
29
|
|
|
30
30
|
function toArr(any) {
|
|
31
31
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
|
@@ -1700,11 +1700,11 @@ function execa(file, args, options) {
|
|
|
1700
1700
|
return mergePromise(spawned, handlePromiseOnce);
|
|
1701
1701
|
}
|
|
1702
1702
|
|
|
1703
|
-
var version = "0.0.
|
|
1703
|
+
var version = "0.0.129";
|
|
1704
1704
|
|
|
1705
1705
|
const CLOSE_TIMEOUT = 1e3;
|
|
1706
1706
|
const cli = cac("vitest");
|
|
1707
|
-
cli.version(version).option("-r, --root <path>", "root path").option("-c, --config <path>", "path to config file").option("-u, --update", "update snapshot").option("-w, --watch", "watch mode").option("-o, --open", "open UI", { default: false }).option("-t, --testNamePattern <pattern>", "run test names with the specified pattern").option("--api", "
|
|
1707
|
+
cli.version(version).option("-r, --root <path>", "root path").option("-c, --config <path>", "path to config file").option("-u, --update", "update snapshot").option("-w, --watch", "watch mode").option("-o, --open", "open UI", { default: false }).option("-t, --testNamePattern <pattern>", "run test names with the specified pattern").option("--api [api]", "Serve API, available options: --api.port <port>, --api.host [host] and --api.strictPort").option("--threads", "enabled threads", { default: true }).option("--silent", "silent console output from tests").option("--isolate", "isolate environment for each test file", { default: true }).option("--reporter <name>", "reporter").option("--coverage", "use c8 for coverage").option("--run", "do not watch").option("--global", "inject apis globally").option("--dom", "mock browser api with happy-dom").option("--environment <env>", "runner environment", { default: "node" }).option("--passWithNoTests", "pass when no tests found").help();
|
|
1708
1708
|
cli.command("run [...filters]").action(run);
|
|
1709
1709
|
cli.command("related [...filters]").action(runRelated);
|
|
1710
1710
|
cli.command("watch [...filters]").action(dev);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import { k as resolve } from './index-
|
|
2
|
+
import { k as resolve } from './index-42a3a132.js';
|
|
3
3
|
|
|
4
4
|
const distDir = resolve(fileURLToPath(import.meta.url), "../../dist");
|
|
5
5
|
const defaultInclude = ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"];
|
|
@@ -30,4 +30,4 @@ const globalApis = [
|
|
|
30
30
|
"afterEach"
|
|
31
31
|
];
|
|
32
32
|
|
|
33
|
-
export { API_PATH as A,
|
|
33
|
+
export { API_PATH as A, defaultInclude as a, defaultExclude as b, distDir as c, defaultPort as d, configFiles as e, globalApis as g };
|
package/dist/entry.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import fs, { promises } from 'fs';
|
|
2
|
-
import { f as format_1, h as getSerializers, p as plugins_1, j as equals, b as getState, k as iterableEquality, l as subsetEquality, m as isA, J as JestChaiExpect, n as clearContext, o as defaultSuite, q as setHooks, r as getHooks, u as context, s as setState, x as getFn, e as vi } from './vi-
|
|
2
|
+
import { f as format_1, h as getSerializers, p as plugins_1, j as equals, b as getState, k as iterableEquality, l as subsetEquality, m as isA, J as JestChaiExpect, n as clearContext, o as defaultSuite, q as setHooks, r as getHooks, u as context, s as setState, x as getFn, e as vi } from './vi-fe26a646.js';
|
|
3
3
|
import { Console } from 'console';
|
|
4
4
|
import { Writable } from 'stream';
|
|
5
5
|
import { importModule } from 'local-pkg';
|
|
6
6
|
import chai$1, { expect, util } from 'chai';
|
|
7
7
|
import { a as commonjsRequire, c as commonjsGlobal } from './_commonjsHelpers-c9e3b764.js';
|
|
8
|
-
import { u as index, s as slash, v as getNames, c, t as toArray, r as relative, w as partitionSuiteChildren, x as hasTests, h as hasFailed } from './index-
|
|
8
|
+
import { u as index, s as slash, v as getNames, c, t as toArray, r as relative, w as partitionSuiteChildren, x as hasTests, h as hasFailed } from './index-42a3a132.js';
|
|
9
9
|
import { r as rpc } from './rpc-8c7cc374.js';
|
|
10
|
-
import { l as getOriginalPos, m as posToNumber, n as parseStacktrace, u as unifiedDiff } from './diff-
|
|
10
|
+
import { l as getOriginalPos, m as posToNumber, n as parseStacktrace, u as unifiedDiff } from './diff-be830986.js';
|
|
11
11
|
import { performance as performance$1 } from 'perf_hooks';
|
|
12
12
|
import { createHash } from 'crypto';
|
|
13
13
|
import { format } from 'util';
|
|
@@ -385,7 +385,7 @@ var chaiSubset = {exports: {}};
|
|
|
385
385
|
var Subset = chaiSubset.exports;
|
|
386
386
|
|
|
387
387
|
async function saveInlineSnapshots(snapshots) {
|
|
388
|
-
const MagicString = (await import('./magic-string.es-
|
|
388
|
+
const MagicString = (await import('./magic-string.es-98a8bfa0.js')).default;
|
|
389
389
|
const files = new Set(snapshots.map((i) => i.file));
|
|
390
390
|
await Promise.all(Array.from(files).map(async (file) => {
|
|
391
391
|
const map = await rpc().getSourceMap(file);
|
|
@@ -1225,7 +1225,7 @@ async function setupGlobalEnv(config) {
|
|
|
1225
1225
|
setupConsoleLogSpy();
|
|
1226
1226
|
await setupChai();
|
|
1227
1227
|
if (config.global)
|
|
1228
|
-
(await import('./global-
|
|
1228
|
+
(await import('./global-0254dd68.js')).registerApiGlobally();
|
|
1229
1229
|
}
|
|
1230
1230
|
function setupConsoleLogSpy() {
|
|
1231
1231
|
const stdout = new Writable({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { g as globalApis } from './constants-
|
|
2
|
-
import { i as index } from './index-
|
|
1
|
+
import { g as globalApis } from './constants-868b9a2e.js';
|
|
2
|
+
import { i as index } from './index-06712022.js';
|
|
3
3
|
import 'url';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-42a3a132.js';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
|
7
7
|
import 'path';
|
|
8
|
-
import './vi-
|
|
8
|
+
import './vi-fe26a646.js';
|
|
9
9
|
import './jest-mock-30625866.js';
|
|
10
10
|
import 'chai';
|
|
11
11
|
import 'tinyspy';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, b as getState, s as setState, c as suite, t as test, d as describe, i as it, v as vitest, e as vi } from './vi-
|
|
1
|
+
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, b as getState, s as setState, c as suite, t as test, d as describe, i as it, v as vitest, e as vi } from './vi-fe26a646.js';
|
|
2
2
|
import chai, { assert, should } from 'chai';
|
|
3
3
|
import { s as spies, i as isMockFunction, a as spyOn, f as fn } from './jest-mock-30625866.js';
|
|
4
4
|
|
|
@@ -319,14 +319,14 @@ async function ensurePackageInstalled(dependency, promptInstall = !process.env.C
|
|
|
319
319
|
`));
|
|
320
320
|
if (!promptInstall)
|
|
321
321
|
return false;
|
|
322
|
-
const prompts = await import('./index-
|
|
322
|
+
const prompts = await import('./index-93dcb598.js').then(function (n) { return n.i; });
|
|
323
323
|
const { install } = await prompts.prompt({
|
|
324
324
|
type: "confirm",
|
|
325
325
|
name: "install",
|
|
326
326
|
message: c.reset(`Do you want to install ${c.green(dependency)}?`)
|
|
327
327
|
});
|
|
328
328
|
if (install) {
|
|
329
|
-
await (await import('./index-
|
|
329
|
+
await (await import('./index-42d44ee5.js')).installPackage(dependency, { dev: true });
|
|
330
330
|
return true;
|
|
331
331
|
}
|
|
332
332
|
return false;
|
|
@@ -2,8 +2,8 @@ import path$2 from 'path';
|
|
|
2
2
|
import fs$2 from 'fs';
|
|
3
3
|
import require$$0 from 'util';
|
|
4
4
|
import childProcess$1 from 'child_process';
|
|
5
|
-
import { p as pathKey, m as mergeStream$1, a as getStream$1, b as crossSpawn$1 } from './index-
|
|
6
|
-
import { a as signalExit, b as onetime$1 } from './index-
|
|
5
|
+
import { p as pathKey, m as mergeStream$1, a as getStream$1, b as crossSpawn$1 } from './index-cce5de77.js';
|
|
6
|
+
import { a as signalExit, b as onetime$1 } from './index-cb02ee01.js';
|
|
7
7
|
import require$$0$1 from 'os';
|
|
8
8
|
import './_commonjsHelpers-c9e3b764.js';
|
|
9
9
|
import 'buffer';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|