vitest 1.0.0-beta.2 → 1.0.0-beta.3
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 -29
- package/dist/browser.d.ts +1 -1
- package/dist/child.js +9 -4
- package/dist/{chunk-api-setup.5d9a93c7.js → chunk-api-setup.37a43981.js} +0 -2
- package/dist/{chunk-install-pkg.43d58972.js → chunk-install-pkg.6349b322.js} +10 -12
- package/dist/{chunk-node-git.2f1df48f.js → chunk-node-git.6c12e560.js} +1 -1
- package/dist/cli-wrapper.js +1 -1
- package/dist/cli.js +11 -18
- package/dist/config.d.ts +2 -2
- package/dist/coverage.d.ts +1 -1
- package/dist/coverage.js +2 -2
- package/dist/entry-vm.js +1 -1
- package/dist/entry.js +1 -1
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -13
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/node.d.ts +5 -3
- package/dist/node.js +14 -16
- package/dist/{reporters-d10f25e1.d.ts → reporters-1678fe04.d.ts} +62 -30
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +1 -1
- package/dist/runners.d.ts +3 -2
- package/dist/runners.js +32 -35
- package/dist/{suite-919dd548.d.ts → suite-0579b50d.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/{vendor-environments.094f240c.js → vendor-environments.dcc4a34e.js} +4 -37
- package/dist/{vendor-execute.07d1a420.js → vendor-execute.e6e4e89b.js} +1 -0
- package/dist/{vendor-index.d36f5516.js → vendor-index.3d079eea.js} +6 -1
- package/dist/{vendor-index.e006069f.js → vendor-index.8efe7746.js} +371 -371
- package/dist/{vendor-index.0b5b3600.js → vendor-loader.9c966f23.js} +36 -9
- package/dist/{vendor-node.e5a35bfe.js → vendor-node.327f8f1f.js} +1928 -1953
- package/dist/{vendor-reporters.2953082e.js → vendor-reporters.b9600369.js} +40 -23
- package/dist/vm.js +9 -4
- package/dist/worker.js +9 -4
- package/package.json +11 -27
- package/dist/loader.js +0 -100
- package/dist/vendor-index.98139333.js +0 -129
package/LICENSE.md
CHANGED
|
@@ -433,35 +433,6 @@ Repository: https://github.com/mathiasbynens/emoji-regex.git
|
|
|
433
433
|
|
|
434
434
|
---------------------------------------
|
|
435
435
|
|
|
436
|
-
## event-target-polyfill
|
|
437
|
-
License: MIT
|
|
438
|
-
By: Ben Lesh
|
|
439
|
-
Repository: git+https://github.com/benlesh/event-target-polyfill.git
|
|
440
|
-
|
|
441
|
-
> MIT License
|
|
442
|
-
>
|
|
443
|
-
> Copyright (c) 2020 Ben Lesh
|
|
444
|
-
>
|
|
445
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
446
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
447
|
-
> in the Software without restriction, including without limitation the rights
|
|
448
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
449
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
450
|
-
> furnished to do so, subject to the following conditions:
|
|
451
|
-
>
|
|
452
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
453
|
-
> copies or substantial portions of the Software.
|
|
454
|
-
>
|
|
455
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
456
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
457
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
458
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
459
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
460
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
461
|
-
> SOFTWARE.
|
|
462
|
-
|
|
463
|
-
---------------------------------------
|
|
464
|
-
|
|
465
436
|
## execa
|
|
466
437
|
License: MIT
|
|
467
438
|
By: Sindre Sorhus
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { processError, startTests } from '@vitest/runner';
|
|
2
|
-
import { R as ResolvedConfig,
|
|
2
|
+
import { R as ResolvedConfig, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule } from './reporters-1678fe04.js';
|
|
3
3
|
import { VitestExecutor } from './execute.js';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import 'vite-node';
|
package/dist/child.js
CHANGED
|
@@ -3,12 +3,11 @@ import v8 from 'node:v8';
|
|
|
3
3
|
import { c as createBirpc } from './vendor-index.1ca68bd5.js';
|
|
4
4
|
import { parseRegexp } from '@vitest/utils';
|
|
5
5
|
import { workerId } from 'tinypool';
|
|
6
|
-
import { l as loadEnvironment } from './vendor-
|
|
7
|
-
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.
|
|
6
|
+
import { l as loadEnvironment } from './vendor-loader.9c966f23.js';
|
|
7
|
+
import { s as startViteNode, m as moduleCache, a as mockMap } from './vendor-execute.e6e4e89b.js';
|
|
8
8
|
import { r as rpcDone, c as createSafeRpc } from './vendor-rpc.cbd8e972.js';
|
|
9
9
|
import { s as setupInspect } from './vendor-inspector.209edf5a.js';
|
|
10
10
|
import 'pathe';
|
|
11
|
-
import './vendor-index.0b5b3600.js';
|
|
12
11
|
import 'acorn';
|
|
13
12
|
import 'node:module';
|
|
14
13
|
import 'node:fs';
|
|
@@ -18,6 +17,7 @@ import 'node:process';
|
|
|
18
17
|
import 'node:path';
|
|
19
18
|
import 'node:util';
|
|
20
19
|
import 'vite-node/client';
|
|
20
|
+
import './vendor-environments.dcc4a34e.js';
|
|
21
21
|
import 'node:console';
|
|
22
22
|
import 'local-pkg';
|
|
23
23
|
import 'node:vm';
|
|
@@ -83,7 +83,12 @@ async function init(ctx) {
|
|
|
83
83
|
rpc,
|
|
84
84
|
isChildProcess: true
|
|
85
85
|
};
|
|
86
|
-
globalThis
|
|
86
|
+
Object.defineProperty(globalThis, "__vitest_worker__", {
|
|
87
|
+
value: state,
|
|
88
|
+
configurable: true,
|
|
89
|
+
writable: true,
|
|
90
|
+
enumerable: false
|
|
91
|
+
});
|
|
87
92
|
if (ctx.invalidates) {
|
|
88
93
|
ctx.invalidates.forEach((fsPath) => {
|
|
89
94
|
moduleCache.delete(fsPath);
|
|
@@ -4645,8 +4645,6 @@ class WebSocketReporter {
|
|
|
4645
4645
|
const parserOptions = {
|
|
4646
4646
|
getSourceMap: (file) => project.getBrowserSourceMapModuleById(file)
|
|
4647
4647
|
};
|
|
4648
|
-
if ((result == null ? void 0 : result.error) && !isPrimitive(result.error))
|
|
4649
|
-
result.error.stacks = parseErrorStacktrace(result.error, parserOptions);
|
|
4650
4648
|
(_a = result == null ? void 0 : result.errors) == null ? void 0 : _a.forEach((error) => {
|
|
4651
4649
|
if (!isPrimitive(error))
|
|
4652
4650
|
error.stacks = parseErrorStacktrace(error, parserOptions);
|
|
@@ -3,8 +3,8 @@ import f from 'path';
|
|
|
3
3
|
import { g as getDefaultExportFromCjs } from './vendor-_commonjsHelpers.7d1333e8.js';
|
|
4
4
|
import require$$0 from 'util';
|
|
5
5
|
import require$$0$2 from 'child_process';
|
|
6
|
-
import { p as pathKeyExports, s as signalExitExports, m as mergeStream$1, g as getStreamExports, c as crossSpawnExports } from './vendor-index.
|
|
7
|
-
import { o as onetimeExports } from './vendor-node.
|
|
6
|
+
import { p as pathKeyExports, s as signalExitExports, m as mergeStream$1, g as getStreamExports, c as crossSpawnExports } from './vendor-index.8efe7746.js';
|
|
7
|
+
import { o as onetimeExports } from './vendor-node.327f8f1f.js';
|
|
8
8
|
import require$$0$1 from 'os';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'node:path';
|
|
@@ -39,26 +39,24 @@ import 'tinypool';
|
|
|
39
39
|
import './vendor-index.1ca68bd5.js';
|
|
40
40
|
import './vendor-base.9c08bbd0.js';
|
|
41
41
|
import 'node:worker_threads';
|
|
42
|
-
import '
|
|
43
|
-
import './vendor-reporters.2953082e.js';
|
|
42
|
+
import 'node:fs/promises';
|
|
44
43
|
import 'node:perf_hooks';
|
|
44
|
+
import '@vitest/utils/source-map';
|
|
45
|
+
import 'local-pkg';
|
|
46
|
+
import 'module';
|
|
47
|
+
import 'acorn';
|
|
48
|
+
import 'acorn-walk';
|
|
49
|
+
import './vendor-reporters.b9600369.js';
|
|
45
50
|
import './chunk-runtime-console.f3263f87.js';
|
|
46
51
|
import 'node:stream';
|
|
47
52
|
import 'node:console';
|
|
48
53
|
import './vendor-date.6e993429.js';
|
|
49
54
|
import './vendor-tasks.f9d75aed.js';
|
|
50
|
-
import '@vitest/utils/source-map';
|
|
51
55
|
import 'node:module';
|
|
52
56
|
import 'node:crypto';
|
|
53
|
-
import 'node:fs/promises';
|
|
54
|
-
import 'module';
|
|
55
|
-
import 'acorn';
|
|
56
|
-
import 'acorn-walk';
|
|
57
57
|
import 'magic-string';
|
|
58
58
|
import 'strip-literal';
|
|
59
|
-
import './vendor-environments.
|
|
60
|
-
import './vendor-index.0b5b3600.js';
|
|
61
|
-
import 'node:assert';
|
|
59
|
+
import './vendor-environments.dcc4a34e.js';
|
|
62
60
|
import 'node:readline';
|
|
63
61
|
import 'readline';
|
|
64
62
|
|
package/dist/cli-wrapper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
2
|
import c from 'picocolors';
|
|
3
|
-
import { e as execa } from './vendor-index.
|
|
3
|
+
import { e as execa } from './vendor-index.8efe7746.js';
|
|
4
4
|
import { E as EXIT_CODE_RESTART } from './vendor-constants.538d9b49.js';
|
|
5
5
|
import 'node:buffer';
|
|
6
6
|
import 'node:path';
|
package/dist/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalize } from 'pathe';
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import c from 'picocolors';
|
|
4
|
-
import { v as version, s as startVitest } from './vendor-node.
|
|
4
|
+
import { v as version, s as startVitest } from './vendor-node.327f8f1f.js';
|
|
5
5
|
import './vendor-index.29282562.js';
|
|
6
|
-
import { d as divider } from './vendor-reporters.
|
|
6
|
+
import { d as divider } from './vendor-reporters.b9600369.js';
|
|
7
7
|
import { t as toArray } from './vendor-base.9c08bbd0.js';
|
|
8
8
|
import 'vite';
|
|
9
9
|
import 'node:path';
|
|
@@ -31,10 +31,9 @@ import 'tinypool';
|
|
|
31
31
|
import './vendor-index.1ca68bd5.js';
|
|
32
32
|
import 'node:worker_threads';
|
|
33
33
|
import '@vitest/utils';
|
|
34
|
-
import '
|
|
35
|
-
import '
|
|
36
|
-
import '
|
|
37
|
-
import './vendor-index.e006069f.js';
|
|
34
|
+
import 'node:fs/promises';
|
|
35
|
+
import 'node:perf_hooks';
|
|
36
|
+
import './vendor-index.8efe7746.js';
|
|
38
37
|
import 'node:buffer';
|
|
39
38
|
import 'node:child_process';
|
|
40
39
|
import 'child_process';
|
|
@@ -42,35 +41,33 @@ import 'assert';
|
|
|
42
41
|
import 'buffer';
|
|
43
42
|
import 'node:util';
|
|
44
43
|
import '@vitest/utils/source-map';
|
|
45
|
-
import '
|
|
44
|
+
import 'local-pkg';
|
|
45
|
+
import 'std-env';
|
|
46
46
|
import 'module';
|
|
47
47
|
import 'acorn';
|
|
48
48
|
import 'acorn-walk';
|
|
49
49
|
import '@vitest/runner/utils';
|
|
50
|
+
import 'node:crypto';
|
|
50
51
|
import 'magic-string';
|
|
51
52
|
import 'strip-literal';
|
|
52
|
-
import './vendor-environments.
|
|
53
|
-
import './vendor-index.0b5b3600.js';
|
|
54
|
-
import 'node:module';
|
|
55
|
-
import 'node:assert';
|
|
53
|
+
import './vendor-environments.dcc4a34e.js';
|
|
56
54
|
import 'node:console';
|
|
57
55
|
import 'node:readline';
|
|
58
56
|
import 'readline';
|
|
59
57
|
import './vendor-global.97e4527c.js';
|
|
60
|
-
import 'node:perf_hooks';
|
|
61
58
|
import './chunk-runtime-console.f3263f87.js';
|
|
62
59
|
import 'node:stream';
|
|
63
60
|
import './vendor-date.6e993429.js';
|
|
64
61
|
import './vendor-tasks.f9d75aed.js';
|
|
62
|
+
import 'node:module';
|
|
65
63
|
|
|
66
64
|
const cli = cac("vitest");
|
|
67
|
-
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", "Enable watch mode").option("-t, --testNamePattern <pattern>", "Run tests with full names matching the specified regexp pattern").option("--dir <path>", "Base directory to scan for the test files").option("--ui", "Enable UI").option("--open", "Open UI automatically (default: !process.env.CI))").option("--api [api]", "Serve API, available options: --api.port <port>, --api.host [host] and --api.strictPort").option("--silent", "Silent console output from tests").option("--hideSkippedTests", "Hide logs for skipped tests").option("--reporter <name>", "Specify reporters").option("--outputFile <filename/-s>", "Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters").option("--coverage", "Enable coverage report").option("--run", "Disable watch mode").option("--mode <name>", "Override Vite mode (default: test)").option("--globals", "Inject apis globally").option("--dom", "Mock browser api with happy-dom").option("--browser [options]", "Run tests in the browser (default: false)").option("--pool <pool>", "Specify pool, if not running in the browser (default: threads)").option("--poolOptions <options>", "Specify pool options").option("--poolOptions.threads.isolate", "Isolate tests in threads pool (default: true)").option("--poolOptions.forks.isolate", "Isolate tests in forks pool (default: true)").option("--environment <env>", "Specify runner environment, if not running in the browser (default: node)").option("--passWithNoTests", "Pass when no tests found").option("--logHeapUsage", "Show the size of heap for each test").option("--allowOnly", "Allow tests and suites that are marked as only (default: !process.env.CI)").option("--dangerouslyIgnoreUnhandledErrors", "Ignore any unhandled errors that occur").option("--shard <shard>", "Test suite shard to execute in a format of <index>/<count>").option("--changed [since]", "Run tests that are affected by the changed files (default: false)").option("--sequence <options>", "Define in what order to run tests (use --sequence.shuffle to run tests in random order, use --sequence.concurrent to run tests in parallel)").option("--segfaultRetry <times>", "Return tests on segment fault (default: 0)", { default: 0 }).option("--no-color", "Removes colors from the console output").option("--inspect", "Enable Node.js inspector").option("--inspect-brk", "Enable Node.js inspector with break").option("--test-timeout <time>", "Default timeout of a test in milliseconds (default: 5000)").option("--bail <number>", "Stop test execution when given number of tests have failed", { default: 0 }).option("--retry <times>", "Retry the test specific number of times if it fails", { default: 0 }).option("--diff <path>", "Path to a diff config that will be used to generate diff interface").help();
|
|
65
|
+
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", "Enable watch mode").option("-t, --testNamePattern <pattern>", "Run tests with full names matching the specified regexp pattern").option("--dir <path>", "Base directory to scan for the test files").option("--ui", "Enable UI").option("--open", "Open UI automatically (default: !process.env.CI))").option("--api [api]", "Serve API, available options: --api.port <port>, --api.host [host] and --api.strictPort").option("--silent", "Silent console output from tests").option("--hideSkippedTests", "Hide logs for skipped tests").option("--reporter <name>", "Specify reporters").option("--outputFile <filename/-s>", "Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters").option("--coverage", "Enable coverage report").option("--run", "Disable watch mode").option("--mode <name>", "Override Vite mode (default: test)").option("--globals", "Inject apis globally").option("--dom", "Mock browser api with happy-dom").option("--browser [options]", "Run tests in the browser (default: false)").option("--pool <pool>", "Specify pool, if not running in the browser (default: threads)").option("--poolOptions <options>", "Specify pool options").option("--poolOptions.threads.isolate", "Isolate tests in threads pool (default: true)").option("--poolOptions.forks.isolate", "Isolate tests in forks pool (default: true)").option("--environment <env>", "Specify runner environment, if not running in the browser (default: node)").option("--passWithNoTests", "Pass when no tests found").option("--logHeapUsage", "Show the size of heap for each test").option("--allowOnly", "Allow tests and suites that are marked as only (default: !process.env.CI)").option("--dangerouslyIgnoreUnhandledErrors", "Ignore any unhandled errors that occur").option("--shard <shard>", "Test suite shard to execute in a format of <index>/<count>").option("--changed [since]", "Run tests that are affected by the changed files (default: false)").option("--sequence <options>", "Define in what order to run tests (use --sequence.shuffle to run tests in random order, use --sequence.concurrent to run tests in parallel)").option("--segfaultRetry <times>", "Return tests on segment fault (default: 0)", { default: 0 }).option("--no-color", "Removes colors from the console output").option("--inspect", "Enable Node.js inspector").option("--inspect-brk", "Enable Node.js inspector with break").option("--test-timeout <time>", "Default timeout of a test in milliseconds (default: 5000)").option("--bail <number>", "Stop test execution when given number of tests have failed", { default: 0 }).option("--retry <times>", "Retry the test specific number of times if it fails", { default: 0 }).option("--diff <path>", "Path to a diff config that will be used to generate diff interface").option("--typecheck [options]", "Custom options for typecheck pool").option("--typecheck.enabled", "Enable typechecking alongside tests (default: false)").option("--typecheck.only", "Run only typecheck tests. This automatically enables typecheck (default: false)").help();
|
|
68
66
|
cli.command("run [...filters]").action(run);
|
|
69
67
|
cli.command("related [...filters]").action(runRelated);
|
|
70
68
|
cli.command("watch [...filters]").action(watch);
|
|
71
69
|
cli.command("dev [...filters]").action(watch);
|
|
72
70
|
cli.command("bench [...filters]").action(benchmark);
|
|
73
|
-
cli.command("typecheck [...filters]").action(typecheck);
|
|
74
71
|
cli.command("[...filters]").action((filters, options) => start("test", filters, options));
|
|
75
72
|
try {
|
|
76
73
|
cli.parse();
|
|
@@ -106,10 +103,6 @@ async function benchmark(cliFilters, options) {
|
|
|
106
103
|
console.warn(c.yellow("Benchmarking is an experimental feature.\nBreaking changes might not follow semver, please pin Vitest's version when using it."));
|
|
107
104
|
await start("benchmark", cliFilters, options);
|
|
108
105
|
}
|
|
109
|
-
async function typecheck(cliFilters = [], options = {}) {
|
|
110
|
-
console.warn(c.yellow("Testing types with tsc and vue-tsc is an experimental feature.\nBreaking changes might not follow semver, please pin Vitest's version when using it."));
|
|
111
|
-
await start("typecheck", cliFilters, options);
|
|
112
|
-
}
|
|
113
106
|
function normalizeCliOptions(argv) {
|
|
114
107
|
if (argv.root)
|
|
115
108
|
argv.root = normalize(argv.root);
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { a as ResolvedCoverageOptions, U as UserConfig, C as CoverageV8Options, P as ProjectConfig } from './reporters-
|
|
3
|
+
import { a as ResolvedCoverageOptions, U as UserConfig, C as CoverageV8Options, P as ProjectConfig } from './reporters-1678fe04.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import 'vite-node';
|
|
6
6
|
import '@vitest/snapshot';
|
|
@@ -24,7 +24,7 @@ declare const config: {
|
|
|
24
24
|
watch: boolean;
|
|
25
25
|
globals: boolean;
|
|
26
26
|
environment: "node";
|
|
27
|
-
pool:
|
|
27
|
+
pool: "threads";
|
|
28
28
|
clearMocks: boolean;
|
|
29
29
|
restoreMocks: boolean;
|
|
30
30
|
mockReset: boolean;
|
package/dist/coverage.d.ts
CHANGED
package/dist/coverage.js
CHANGED
|
@@ -12,7 +12,7 @@ class BaseCoverageProvider {
|
|
|
12
12
|
const summaries = perFile ? coverageMap.files().map((file) => coverageMap.fileCoverageFor(file).toSummary()) : [coverageMap.getCoverageSummary()];
|
|
13
13
|
const thresholdsToUpdate = [];
|
|
14
14
|
for (const key of THRESHOLD_KEYS) {
|
|
15
|
-
const threshold = thresholds[key]
|
|
15
|
+
const threshold = thresholds[key] ?? 100;
|
|
16
16
|
const actual = Math.min(...summaries.map((summary) => summary[key].pct));
|
|
17
17
|
if (actual > threshold)
|
|
18
18
|
thresholdsToUpdate.push([key, actual]);
|
|
@@ -22,7 +22,7 @@ class BaseCoverageProvider {
|
|
|
22
22
|
const originalConfig = readFileSync(configurationFile, "utf8");
|
|
23
23
|
let updatedConfig = originalConfig;
|
|
24
24
|
for (const [threshold, newValue] of thresholdsToUpdate) {
|
|
25
|
-
const previousThreshold = (thresholds[threshold]
|
|
25
|
+
const previousThreshold = (thresholds[threshold] ?? 100).toString();
|
|
26
26
|
const pattern = new RegExp(`(${threshold}\\s*:\\s*)${previousThreshold.replace(".", "\\.")}`);
|
|
27
27
|
const matches = originalConfig.match(pattern);
|
|
28
28
|
if (matches)
|
package/dist/entry-vm.js
CHANGED
|
@@ -5,7 +5,7 @@ import timers from 'node:timers';
|
|
|
5
5
|
import { performance } from 'node:perf_hooks';
|
|
6
6
|
import { startTests } from '@vitest/runner';
|
|
7
7
|
import { setupColors, createColors } from '@vitest/utils';
|
|
8
|
-
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.
|
|
8
|
+
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.3d079eea.js';
|
|
9
9
|
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor-coverage.78040316.js';
|
|
10
10
|
import { g as getWorkerState } from './vendor-global.97e4527c.js';
|
|
11
11
|
import { i as index } from './vendor-index.68ecee35.js';
|
package/dist/entry.js
CHANGED
|
@@ -3,7 +3,7 @@ import { startTests } from '@vitest/runner';
|
|
|
3
3
|
import './vendor-index.29282562.js';
|
|
4
4
|
import { a as globalExpect, r as resetModules, v as vi } from './vendor-vi.d30b47ae.js';
|
|
5
5
|
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor-coverage.78040316.js';
|
|
6
|
-
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.
|
|
6
|
+
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.3d079eea.js';
|
|
7
7
|
import { createRequire } from 'node:module';
|
|
8
8
|
import util from 'node:util';
|
|
9
9
|
import timers from 'node:timers';
|
package/dist/environments.d.ts
CHANGED
package/dist/environments.js
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
export { e as builtinEnvironments, p as populateGlobal } from './vendor-environments.
|
|
2
|
-
import 'pathe';
|
|
3
|
-
import './vendor-index.0b5b3600.js';
|
|
4
|
-
import 'acorn';
|
|
5
|
-
import 'node:module';
|
|
6
|
-
import 'node:fs';
|
|
7
|
-
import 'node:url';
|
|
8
|
-
import 'node:assert';
|
|
9
|
-
import 'node:process';
|
|
10
|
-
import 'node:path';
|
|
11
|
-
import 'node:v8';
|
|
12
|
-
import 'node:util';
|
|
13
|
-
import 'vite-node/client';
|
|
1
|
+
export { e as builtinEnvironments, p as populateGlobal } from './vendor-environments.dcc4a34e.js';
|
|
14
2
|
import 'node:console';
|
|
15
3
|
import 'local-pkg';
|
package/dist/execute.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vm from 'node:vm';
|
|
2
2
|
import { ViteNodeRunner } from 'vite-node/client';
|
|
3
3
|
import { ViteNodeRunnerOptions } from 'vite-node';
|
|
4
|
-
import {
|
|
4
|
+
import { ak as PendingSuiteMock, al as MockFactory, a0 as WorkerGlobalState, am as MockMap, O as RuntimeRPC } from './reporters-1678fe04.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import '@vitest/snapshot';
|
package/dist/execute.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TaskPopulated, File, TaskResultPack, CancelReason } from '@vitest/runner';
|
|
2
2
|
export { Custom, DoneCallback, ExtendedContext, File, HookCleanupCallback, HookListener, OnTestFailedHandler, RunMode, RuntimeContext, SequenceHooks, SequenceSetupFiles, Suite, SuiteAPI, SuiteCollector, SuiteFactory, SuiteHooks, Task, TaskBase, TaskContext, TaskCustomOptions, TaskMeta, TaskResult, TaskResultPack, TaskState, Test, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
|
|
3
|
-
export { b as bench } from './suite-
|
|
3
|
+
export { b as bench } from './suite-0579b50d.js';
|
|
4
4
|
import { ExpectStatic } from '@vitest/expect';
|
|
5
5
|
export { Assertion, AsymmetricMatchersContaining, ExpectStatic, JestAssertion } from '@vitest/expect';
|
|
6
|
-
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper,
|
|
7
|
-
export {
|
|
6
|
+
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, k as RuntimeConfig, A as AfterSuiteRunMeta, l as UserConsoleLog, R as ResolvedConfig, m as ModuleGraphData, n as Reporter } from './reporters-1678fe04.js';
|
|
7
|
+
export { D as ApiConfig, a4 as ArgumentsType, a3 as Arrayable, a1 as Awaitable, B as BaseCoverageOptions, ai as BenchFunction, ag as Benchmark, aj as BenchmarkAPI, ah as BenchmarkResult, af as BenchmarkUserOptions, x as BuiltinEnvironment, z as CSSModuleScopeStrategy, q as CollectLineNumbers, r as CollectLines, a6 as Constructable, u as Context, Y as ContextRPC, S as ContextTestEnvironment, ad as CoverageIstanbulOptions, b as CoverageOptions, c as CoverageProvider, d as CoverageProviderModule, ac as CoverageReporter, C as CoverageV8Options, ae as CustomProviderOptions, I as DepsOptimizationOptions, E as Environment, G as EnvironmentOptions, a8 as EnvironmentReturn, H as HappyDOMOptions, L as InlineConfig, J as JSDOMOptions, a7 as ModuleCache, a5 as MutableArray, a2 as Nullable, aa as OnServerRestartHandler, v as Pool, w as PoolOptions, P as ProjectConfig, o as RawErrsMap, ab as ReportContext, _ as ResolveIdFunction, a as ResolvedCoverageOptions, X as ResolvedTestEnvironment, t as RootAndTarget, Q as RunnerRPC, O as RuntimeRPC, K as TransformModePatterns, p as TscErrorInfo, N as TypecheckConfig, U as UserConfig, e as Vitest, y as VitestEnvironment, V as VitestRunMode, a9 as VmEnvironmentReturn, Z as WorkerContext, a0 as WorkerGlobalState, $ as WorkerRPC } from './reporters-1678fe04.js';
|
|
8
8
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, EnhancedSpy } from '@vitest/spy';
|
|
9
9
|
export { EnhancedSpy, Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject, SpyInstance } from '@vitest/spy';
|
|
10
10
|
export { SnapshotEnvironment } from '@vitest/snapshot/environment';
|
|
@@ -373,7 +373,7 @@ interface VitestUtils {
|
|
|
373
373
|
declare const vitest: VitestUtils;
|
|
374
374
|
declare const vi: VitestUtils;
|
|
375
375
|
|
|
376
|
-
declare function getRunningMode(): "
|
|
376
|
+
declare function getRunningMode(): "watch" | "run";
|
|
377
377
|
declare function isWatchMode(): boolean;
|
|
378
378
|
|
|
379
379
|
interface TransformResultWithSource extends TransformResult {
|
|
@@ -408,4 +408,4 @@ interface WebSocketEvents extends Pick<Reporter, 'onCollected' | 'onFinished' |
|
|
|
408
408
|
onCancel(reason: CancelReason): void;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
export { AfterSuiteRunMeta, type AssertType, type ExpectTypeOf, ModuleGraphData, Reporter, ResolvedConfig, RuntimeConfig, type TransformResultWithSource, UserConsoleLog, type WebSocketEvents, type WebSocketHandlers, assertType, createExpect, globalExpect as expect, expectTypeOf, getRunningMode, isFirstRun, isWatchMode, runOnce, vi, vitest };
|
|
411
|
+
export { AfterSuiteRunMeta, type AssertType, type ExpectTypeOf, ModuleGraphData, Reporter, ResolvedConfig, RuntimeConfig, type TransformResultWithSource, UserConsoleLog, type VitestUtils, type WebSocketEvents, type WebSocketHandlers, assertType, createExpect, globalExpect as expect, expectTypeOf, getRunningMode, isFirstRun, isWatchMode, runOnce, vi, vitest };
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VitestRunMode, U as UserConfig,
|
|
2
|
-
export {
|
|
1
|
+
import { V as VitestRunMode, U as UserConfig, e as Vitest, T as TestSequencer, W as WorkspaceSpec } from './reporters-1678fe04.js';
|
|
2
|
+
export { i as BrowserProvider, h as BrowserProviderInitializationOptions, j as BrowserProviderOptions, g as TestSequencerConstructor, f as WorkspaceProject, s as startVitest } from './reporters-1678fe04.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import 'vite-node';
|
|
@@ -29,4 +29,6 @@ declare class BaseSequencer implements TestSequencer {
|
|
|
29
29
|
sort(files: WorkspaceSpec[]): Promise<WorkspaceSpec[]>;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
declare function ensurePackageInstalled(dependency: string, root: string): Promise<boolean>;
|
|
33
|
+
|
|
34
|
+
export { BaseSequencer, TestSequencer, Vitest, VitestPlugin, WorkspaceSpec, createVitest, ensurePackageInstalled, registerConsoleShortcuts };
|
package/dist/node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor-node.
|
|
1
|
+
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, e as ensurePackageInstalled, r as registerConsoleShortcuts, s as startVitest } from './vendor-node.327f8f1f.js';
|
|
2
2
|
import 'pathe';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'node:path';
|
|
@@ -32,32 +32,30 @@ import 'tinypool';
|
|
|
32
32
|
import './vendor-index.1ca68bd5.js';
|
|
33
33
|
import './vendor-base.9c08bbd0.js';
|
|
34
34
|
import 'node:worker_threads';
|
|
35
|
-
import '
|
|
36
|
-
import './vendor-reporters.2953082e.js';
|
|
35
|
+
import 'node:fs/promises';
|
|
37
36
|
import 'node:perf_hooks';
|
|
38
|
-
import './
|
|
39
|
-
import 'node:stream';
|
|
40
|
-
import 'node:console';
|
|
41
|
-
import './vendor-date.6e993429.js';
|
|
42
|
-
import './vendor-tasks.f9d75aed.js';
|
|
43
|
-
import '@vitest/utils/source-map';
|
|
44
|
-
import 'node:module';
|
|
45
|
-
import 'node:crypto';
|
|
46
|
-
import './vendor-index.e006069f.js';
|
|
37
|
+
import './vendor-index.8efe7746.js';
|
|
47
38
|
import 'node:buffer';
|
|
48
39
|
import 'node:child_process';
|
|
49
40
|
import 'child_process';
|
|
50
41
|
import 'assert';
|
|
51
42
|
import 'buffer';
|
|
52
43
|
import 'node:util';
|
|
53
|
-
import '
|
|
44
|
+
import '@vitest/utils/source-map';
|
|
45
|
+
import 'local-pkg';
|
|
54
46
|
import 'module';
|
|
55
47
|
import 'acorn';
|
|
56
48
|
import 'acorn-walk';
|
|
49
|
+
import './vendor-reporters.b9600369.js';
|
|
50
|
+
import './chunk-runtime-console.f3263f87.js';
|
|
51
|
+
import 'node:stream';
|
|
52
|
+
import 'node:console';
|
|
53
|
+
import './vendor-date.6e993429.js';
|
|
54
|
+
import './vendor-tasks.f9d75aed.js';
|
|
55
|
+
import 'node:module';
|
|
56
|
+
import 'node:crypto';
|
|
57
57
|
import 'magic-string';
|
|
58
58
|
import 'strip-literal';
|
|
59
|
-
import './vendor-environments.
|
|
60
|
-
import './vendor-index.0b5b3600.js';
|
|
61
|
-
import 'node:assert';
|
|
59
|
+
import './vendor-environments.dcc4a34e.js';
|
|
62
60
|
import 'node:readline';
|
|
63
61
|
import 'readline';
|