vitest 0.26.3 → 0.27.0
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 +2 -54
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +15 -15
- package/dist/{chunk-api-setup.47a09f0f.js → chunk-api-setup.16ac28c0.js} +9 -4
- package/dist/{chunk-integrations-coverage.befed097.js → chunk-integrations-coverage.44413252.js} +19 -1
- package/dist/chunk-integrations-globals.3dfaeb99.js +27 -0
- package/dist/{chunk-typecheck-constants.06e1fe5b.js → chunk-mock-date.a1c85759.js} +9 -27
- package/dist/{chunk-node-git.a90c0582.js → chunk-node-git.543e964a.js} +1 -2
- package/dist/{chunk-runtime-chain.f51aa930.js → chunk-runtime-chain.6df5a66b.js} +1191 -1027
- package/dist/{chunk-runtime-error.f5c8aaf2.js → chunk-runtime-error.fad2c32b.js} +2 -2
- package/dist/{chunk-runtime-mocker.887bf8c8.js → chunk-runtime-mocker.a677dd28.js} +8 -6
- package/dist/{chunk-runtime-rpc.54d72169.js → chunk-runtime-rpc.7f83c8a9.js} +2 -2
- package/dist/{chunk-runtime-setup.a06d5c72.js → chunk-runtime-setup.731b2b04.js} +51 -52
- package/dist/{chunk-snapshot-manager.70695b70.js → chunk-snapshot-manager.700322bf.js} +408 -272
- package/dist/{chunk-utils-env.3fdc1793.js → chunk-utils-env.b861e3a0.js} +1 -63
- package/dist/{chunk-utils-import.e7f64637.js → chunk-utils-import.2baa69a9.js} +22 -8
- package/dist/chunk-utils-source-map.60562959.js +408 -0
- package/dist/{chunk-utils-timers.715da787.js → chunk-utils-timers.52534f96.js} +2977 -3458
- package/dist/cli-wrapper.js +11 -11
- package/dist/cli.js +12 -624
- package/dist/config.cjs +2 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -1
- package/dist/entry.js +14 -14
- package/dist/environments.d.ts +1 -1
- package/dist/{index-761e769b.d.ts → index-2d10c3fd.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -12
- package/dist/loader.js +3 -3
- package/dist/node.d.ts +2 -2
- package/dist/node.js +8 -8
- package/dist/spy.js +2 -102
- package/dist/suite.js +10 -10
- package/dist/{types-bae746aa.d.ts → types-e1e1d1e5.d.ts} +88 -76
- package/dist/vendor-index.723a074f.js +102 -0
- package/dist/worker.js +7 -7
- package/package.json +9 -5
- package/dist/chunk-integrations-globals.ee28730b.js +0 -27
- package/dist/chunk-utils-source-map.5278ee22.js +0 -86
package/LICENSE.md
CHANGED
|
@@ -250,7 +250,7 @@ Repository: chalk/ansi-regex
|
|
|
250
250
|
|
|
251
251
|
> MIT License
|
|
252
252
|
>
|
|
253
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
253
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
254
254
|
>
|
|
255
255
|
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
256
256
|
>
|
|
@@ -267,7 +267,7 @@ Repository: chalk/ansi-styles
|
|
|
267
267
|
|
|
268
268
|
> MIT License
|
|
269
269
|
>
|
|
270
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
270
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
271
271
|
>
|
|
272
272
|
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
273
273
|
>
|
|
@@ -335,35 +335,6 @@ Repository: micromatch/braces
|
|
|
335
335
|
|
|
336
336
|
---------------------------------------
|
|
337
337
|
|
|
338
|
-
## cac
|
|
339
|
-
License: MIT
|
|
340
|
-
By: egoist
|
|
341
|
-
Repository: egoist/cac
|
|
342
|
-
|
|
343
|
-
> The MIT License (MIT)
|
|
344
|
-
>
|
|
345
|
-
> Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)
|
|
346
|
-
>
|
|
347
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
348
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
349
|
-
> in the Software without restriction, including without limitation the rights
|
|
350
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
351
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
352
|
-
> furnished to do so, subject to the following conditions:
|
|
353
|
-
>
|
|
354
|
-
> The above copyright notice and this permission notice shall be included in
|
|
355
|
-
> all copies or substantial portions of the Software.
|
|
356
|
-
>
|
|
357
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
358
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
359
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
360
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
361
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
362
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
363
|
-
> THE SOFTWARE.
|
|
364
|
-
|
|
365
|
-
---------------------------------------
|
|
366
|
-
|
|
367
338
|
## chai-subset
|
|
368
339
|
License: MIT
|
|
369
340
|
By: Andrii Shumada, Robert Herhold
|
|
@@ -1693,29 +1664,6 @@ Repository: unjs/pathe
|
|
|
1693
1664
|
|
|
1694
1665
|
---------------------------------------
|
|
1695
1666
|
|
|
1696
|
-
## picocolors
|
|
1697
|
-
License: ISC
|
|
1698
|
-
By: Alexey Raspopov
|
|
1699
|
-
Repository: alexeyraspopov/picocolors
|
|
1700
|
-
|
|
1701
|
-
> ISC License
|
|
1702
|
-
>
|
|
1703
|
-
> Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
|
|
1704
|
-
>
|
|
1705
|
-
> Permission to use, copy, modify, and/or distribute this software for any
|
|
1706
|
-
> purpose with or without fee is hereby granted, provided that the above
|
|
1707
|
-
> copyright notice and this permission notice appear in all copies.
|
|
1708
|
-
>
|
|
1709
|
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
1710
|
-
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
1711
|
-
> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
1712
|
-
> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
1713
|
-
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
1714
|
-
> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
1715
|
-
> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
1716
|
-
|
|
1717
|
-
---------------------------------------
|
|
1718
|
-
|
|
1719
1667
|
## picomatch
|
|
1720
1668
|
License: MIT
|
|
1721
1669
|
By: Jon Schlinkert
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AssertType, E as EnhancedSpy, q as ExpectTypeOf, x as Mock, y as MockContext, w as MockInstance, z as Mocked, B as MockedClass, u as MockedFunction, v as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, r as assertType, h as beforeAll, k as beforeEach, n as createExpect, e as describe, m as expect, p as expectTypeOf, i as it, o as onTestFailed, d as suite, t as test } from './index-
|
|
2
|
-
import { b as ResolvedConfig } from './types-
|
|
3
|
-
export {
|
|
1
|
+
export { A as AssertType, E as EnhancedSpy, q as ExpectTypeOf, x as Mock, y as MockContext, w as MockInstance, z as Mocked, B as MockedClass, u as MockedFunction, v as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, r as assertType, h as beforeAll, k as beforeEach, n as createExpect, e as describe, m as expect, p as expectTypeOf, i as it, o as onTestFailed, d as suite, t as test } from './index-2d10c3fd.js';
|
|
2
|
+
import { b as ResolvedConfig } from './types-e1e1d1e5.js';
|
|
3
|
+
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable, ao as BaseCoverageOptions, au as BenchFunction, as as Benchmark, av as BenchmarkAPI, at as BenchmarkResult, ar as BenchmarkUserOptions, B as BuiltinEnvironment, j as CSSModuleScopeStrategy, C as CollectLineNumbers, g as CollectLines, ab as Constructable, i as Context, aq as CoverageC8Options, ap as CoverageIstanbulOptions, am as CoverageOptions, aj as CoverageProvider, ak as CoverageProviderModule, al as CoverageReporter, a9 as DeepMerge, D as DoneCallback, ae as Environment, E as EnvironmentOptions, ad as EnvironmentReturn, ah as ErrorWithDiff, a as File, x as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, a8 as MergeInsertions, ac as ModuleCache, c as ModuleGraphData, aa as MutableArray, a5 as Nullable, ai as OnServerRestartHandler, O as OnTestFailedHandler, ag as ParsedStack, e as RawErrsMap, d as Reporter, a0 as ResolveIdFunction, b as ResolvedConfig, an as ResolvedCoverageOptions, h as RootAndTarget, m as RunMode, R as RuntimeConfig, K as RuntimeContext, S as SequenceHooks, P as SnapshotData, X as SnapshotMatchOptions, Y as SnapshotResult, W as SnapshotStateOptions, _ as SnapshotSummary, Q as SnapshotUpdateState, q as Suite, w as SuiteAPI, z as SuiteCollector, G as SuiteFactory, y as SuiteHooks, s as Task, o as TaskBase, p as TaskResult, T as TaskResultPack, n as TaskState, r as Test, v as TestAPI, L as TestContext, t as TestFunction, u as TestOptions, f as TscErrorInfo, l as TypecheckConfig, Z as UncheckedSnapshot, U as UserConfig, af as UserConsoleLog, N as Vitest, V as VitestEnvironment, k as VitestRunMode, $ as WorkerContext, a3 as WorkerGlobalState, a2 as WorkerRPC } from './types-e1e1d1e5.js';
|
|
4
4
|
import * as chai from 'chai';
|
|
5
5
|
export { chai };
|
|
6
6
|
export { assert, should } from 'chai';
|
package/dist/browser.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export { c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.
|
|
2
|
-
import { e as dist } from './chunk-utils-import.
|
|
3
|
-
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, o as onTestFailed } from './chunk-utils-import.
|
|
4
|
-
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-setup.
|
|
1
|
+
export { c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.6df5a66b.js';
|
|
2
|
+
import { e as dist } from './chunk-utils-import.2baa69a9.js';
|
|
3
|
+
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, o as onTestFailed } from './chunk-utils-import.2baa69a9.js';
|
|
4
|
+
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-setup.731b2b04.js';
|
|
5
5
|
import * as chai from 'chai';
|
|
6
6
|
export { chai };
|
|
7
7
|
export { assert, should } from 'chai';
|
|
8
8
|
import 'util';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-mock-date.a1c85759.js';
|
|
10
10
|
import 'node:path';
|
|
11
|
-
import '
|
|
12
|
-
import '
|
|
11
|
+
import 'picocolors';
|
|
12
|
+
import 'local-pkg';
|
|
13
|
+
import './chunk-utils-env.b861e3a0.js';
|
|
13
14
|
import 'node:url';
|
|
14
15
|
import 'path';
|
|
15
|
-
import 'local-pkg';
|
|
16
16
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
17
|
-
import './chunk-
|
|
18
|
-
import './
|
|
17
|
+
import './chunk-utils-timers.52534f96.js';
|
|
18
|
+
import './vendor-index.723a074f.js';
|
|
19
|
+
import 'tinyspy';
|
|
20
|
+
import './chunk-utils-source-map.60562959.js';
|
|
21
|
+
import './chunk-runtime-rpc.7f83c8a9.js';
|
|
19
22
|
import 'node:fs';
|
|
20
|
-
import './chunk-utils-source-map.5278ee22.js';
|
|
21
23
|
import 'fs';
|
|
22
|
-
import './spy.js';
|
|
23
|
-
import 'tinyspy';
|
|
24
24
|
import 'perf_hooks';
|
|
25
|
-
import './chunk-integrations-coverage.
|
|
26
|
-
import './chunk-runtime-error.
|
|
25
|
+
import './chunk-integrations-coverage.44413252.js';
|
|
26
|
+
import './chunk-runtime-error.fad2c32b.js';
|
|
27
27
|
import 'vite-node/source-map';
|
|
28
28
|
import './chunk-env-node.b3664da2.js';
|
|
29
29
|
import 'node:console';
|
|
@@ -9,14 +9,15 @@ import require$$2 from 'events';
|
|
|
9
9
|
import require$$1 from 'https';
|
|
10
10
|
import require$$2$1 from 'http';
|
|
11
11
|
import require$$7 from 'url';
|
|
12
|
-
import { A as API_PATH } from './chunk-utils-env.
|
|
13
|
-
import './chunk-
|
|
14
|
-
import {
|
|
15
|
-
import 'tty';
|
|
12
|
+
import { A as API_PATH } from './chunk-utils-env.b861e3a0.js';
|
|
13
|
+
import './chunk-mock-date.a1c85759.js';
|
|
14
|
+
import { b as parseStacktrace } from './chunk-utils-source-map.60562959.js';
|
|
16
15
|
import 'node:url';
|
|
17
16
|
import 'path';
|
|
18
17
|
import 'node:path';
|
|
18
|
+
import 'picocolors';
|
|
19
19
|
import 'local-pkg';
|
|
20
|
+
import './chunk-utils-timers.52534f96.js';
|
|
20
21
|
|
|
21
22
|
async function getModuleGraph(ctx, id) {
|
|
22
23
|
const graph = {};
|
|
@@ -4559,8 +4560,12 @@ class WebSocketReporter {
|
|
|
4559
4560
|
if (this.clients.size === 0)
|
|
4560
4561
|
return;
|
|
4561
4562
|
packs.forEach(([, result]) => {
|
|
4563
|
+
var _a;
|
|
4562
4564
|
if (result == null ? void 0 : result.error)
|
|
4563
4565
|
result.error.stacks = parseStacktrace(result.error);
|
|
4566
|
+
(_a = result == null ? void 0 : result.errors) == null ? void 0 : _a.forEach((error) => {
|
|
4567
|
+
error.stacks = parseStacktrace(error);
|
|
4568
|
+
});
|
|
4564
4569
|
});
|
|
4565
4570
|
this.clients.forEach((client) => {
|
|
4566
4571
|
var _a;
|
package/dist/{chunk-integrations-coverage.befed097.js → chunk-integrations-coverage.44413252.js}
RENAMED
|
@@ -218,5 +218,23 @@ function checkAllowOnly(task, allowOnly) {
|
|
|
218
218
|
error: new Error("[Vitest] Unexpected .only modifier. Remove it or pass --allowOnly argument to bypass this error")
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
+
function generateHash(str) {
|
|
222
|
+
let hash = 0;
|
|
223
|
+
if (str.length === 0)
|
|
224
|
+
return `${hash}`;
|
|
225
|
+
for (let i = 0; i < str.length; i++) {
|
|
226
|
+
const char = str.charCodeAt(i);
|
|
227
|
+
hash = (hash << 5) - hash + char;
|
|
228
|
+
hash = hash & hash;
|
|
229
|
+
}
|
|
230
|
+
return `${hash}`;
|
|
231
|
+
}
|
|
232
|
+
function calculateSuiteHash(parent) {
|
|
233
|
+
parent.tasks.forEach((t, idx) => {
|
|
234
|
+
t.id = `${parent.id}_${idx}`;
|
|
235
|
+
if (t.type === "suite")
|
|
236
|
+
calculateSuiteHash(t);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
221
239
|
|
|
222
|
-
export { CoverageProviderMap as C, getCoverageProvider as g, interpretTaskModes as i, pLimit as p, someTasksAreOnly as s, takeCoverageInsideWorker as t };
|
|
240
|
+
export { CoverageProviderMap as C, getCoverageProvider as a, calculateSuiteHash as c, generateHash as g, interpretTaskModes as i, pLimit as p, someTasksAreOnly as s, takeCoverageInsideWorker as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { m as globalApis } from './chunk-utils-env.b861e3a0.js';
|
|
2
|
+
import { i as index } from './chunk-utils-import.2baa69a9.js';
|
|
3
|
+
import 'node:url';
|
|
4
|
+
import 'path';
|
|
5
|
+
import './chunk-runtime-chain.6df5a66b.js';
|
|
6
|
+
import 'util';
|
|
7
|
+
import 'chai';
|
|
8
|
+
import './chunk-mock-date.a1c85759.js';
|
|
9
|
+
import 'node:path';
|
|
10
|
+
import 'picocolors';
|
|
11
|
+
import 'local-pkg';
|
|
12
|
+
import './vendor-_commonjsHelpers.addc3445.js';
|
|
13
|
+
import './chunk-utils-timers.52534f96.js';
|
|
14
|
+
import './vendor-index.723a074f.js';
|
|
15
|
+
import 'tinyspy';
|
|
16
|
+
import './chunk-utils-source-map.60562959.js';
|
|
17
|
+
import './chunk-runtime-rpc.7f83c8a9.js';
|
|
18
|
+
import 'node:fs';
|
|
19
|
+
import 'fs';
|
|
20
|
+
|
|
21
|
+
function registerApiGlobally() {
|
|
22
|
+
globalApis.forEach((api) => {
|
|
23
|
+
globalThis[api] = index[api];
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { registerApiGlobally };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { relative } from 'node:path';
|
|
2
|
-
import
|
|
2
|
+
import c from 'picocolors';
|
|
3
3
|
import { isPackageExists } from 'local-pkg';
|
|
4
|
-
|
|
5
|
-
const TYPECHECK_SUITE = Symbol("vitest:typecheck-suite");
|
|
4
|
+
import { i as isNode, a as isBrowser, r as relative$1, E as EXIT_CODE_RESTART } from './chunk-utils-env.b861e3a0.js';
|
|
6
5
|
|
|
7
6
|
const RealDate = Date;
|
|
8
7
|
let now = null;
|
|
@@ -152,12 +151,6 @@ function deepMerge(target, ...sources) {
|
|
|
152
151
|
function isMergeableObject(item) {
|
|
153
152
|
return isPlainObject(item) && !Array.isArray(item);
|
|
154
153
|
}
|
|
155
|
-
function assertTypes(value, name, types) {
|
|
156
|
-
const receivedType = typeof value;
|
|
157
|
-
const pass = types.includes(receivedType);
|
|
158
|
-
if (!pass)
|
|
159
|
-
throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`);
|
|
160
|
-
}
|
|
161
154
|
function stdout() {
|
|
162
155
|
return console._stdout || process.stdout;
|
|
163
156
|
}
|
|
@@ -178,21 +171,11 @@ function shuffle(array, seed = RealDate.now()) {
|
|
|
178
171
|
}
|
|
179
172
|
|
|
180
173
|
function isAtomTest(s) {
|
|
181
|
-
return s.type === "test" || s.type === "benchmark"
|
|
174
|
+
return s.type === "test" || s.type === "benchmark";
|
|
182
175
|
}
|
|
183
176
|
function getTests(suite) {
|
|
184
177
|
return toArray(suite).flatMap((s) => isAtomTest(s) ? [s] : s.tasks.flatMap((c) => isAtomTest(c) ? [c] : getTests(c)));
|
|
185
178
|
}
|
|
186
|
-
function isTypecheckTest(suite) {
|
|
187
|
-
return TYPECHECK_SUITE in suite;
|
|
188
|
-
}
|
|
189
|
-
function getTypecheckTests(suite) {
|
|
190
|
-
return toArray(suite).flatMap((s) => {
|
|
191
|
-
if (s.type !== "suite")
|
|
192
|
-
return [];
|
|
193
|
-
return TYPECHECK_SUITE in s ? [s, ...getTypecheckTests(s.tasks)] : getTypecheckTests(s.tasks);
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
179
|
function getSuites(suite) {
|
|
197
180
|
return toArray(suite).flatMap((s) => s.type === "suite" ? [s, ...getSuites(s.tasks)] : []);
|
|
198
181
|
}
|
|
@@ -208,8 +191,7 @@ function hasFailed(suite) {
|
|
|
208
191
|
function hasFailedSnapshot(suite) {
|
|
209
192
|
return getTests(suite).some((s) => {
|
|
210
193
|
var _a, _b;
|
|
211
|
-
|
|
212
|
-
return message == null ? void 0 : message.match(/Snapshot .* mismatched/);
|
|
194
|
+
return (_b = (_a = s.result) == null ? void 0 : _a.errors) == null ? void 0 : _b.some((e) => e.message.match(/Snapshot .* mismatched/));
|
|
213
195
|
});
|
|
214
196
|
}
|
|
215
197
|
function getNames(task) {
|
|
@@ -265,7 +247,7 @@ function resetModules(modules, resetMocks = false) {
|
|
|
265
247
|
});
|
|
266
248
|
}
|
|
267
249
|
function getFullName(task) {
|
|
268
|
-
return getNames(task).join(
|
|
250
|
+
return getNames(task).join(c.dim(" > "));
|
|
269
251
|
}
|
|
270
252
|
function removeUndefinedValues(obj) {
|
|
271
253
|
for (const key in Object.keys(obj)) {
|
|
@@ -278,7 +260,7 @@ async function ensurePackageInstalled(dependency, root) {
|
|
|
278
260
|
if (isPackageExists(dependency, { paths: [root] }))
|
|
279
261
|
return true;
|
|
280
262
|
const promptInstall = !process.env.CI && process.stdout.isTTY;
|
|
281
|
-
process.stderr.write(
|
|
263
|
+
process.stderr.write(c.red(`${c.inverse(c.red(" MISSING DEP "))} Can not find dependency '${dependency}'
|
|
282
264
|
|
|
283
265
|
`));
|
|
284
266
|
if (!promptInstall)
|
|
@@ -287,11 +269,11 @@ async function ensurePackageInstalled(dependency, root) {
|
|
|
287
269
|
const { install } = await prompts.prompt({
|
|
288
270
|
type: "confirm",
|
|
289
271
|
name: "install",
|
|
290
|
-
message:
|
|
272
|
+
message: c.reset(`Do you want to install ${c.green(dependency)}?`)
|
|
291
273
|
});
|
|
292
274
|
if (install) {
|
|
293
275
|
await (await import('./chunk-install-pkg.6dd2bae6.js')).installPackage(dependency, { dev: true });
|
|
294
|
-
process.stderr.write(
|
|
276
|
+
process.stderr.write(c.yellow(`
|
|
295
277
|
Package ${dependency} installed, re-run the command to start.
|
|
296
278
|
`));
|
|
297
279
|
process.exit(EXIT_CODE_RESTART);
|
|
@@ -356,4 +338,4 @@ function objectAttr(source, path, defaultValue = void 0) {
|
|
|
356
338
|
return result;
|
|
357
339
|
}
|
|
358
340
|
|
|
359
|
-
export { AggregateErrorPonyfill as A,
|
|
341
|
+
export { AggregateErrorPonyfill as A, hasFailedSnapshot as B, getSuites as C, deepMerge as D, removeUndefinedValues as E, isWindows as F, stdout as G, getAllMockableProperties as H, RealDate as R, resetModules as a, getCallLastIndex as b, getNames as c, getCurrentEnvironment as d, getFullName as e, isRunningInTest as f, getWorkerState as g, isRunningInBenchmark as h, isObject as i, notNullish as j, relativePath as k, shuffle as l, mockDate as m, noop as n, objectAttr as o, partitionSuiteChildren as p, hasTests as q, resetDate as r, slash as s, toArray as t, hasFailed as u, createDefer as v, deepClone as w, getType as x, ensurePackageInstalled as y, getTests as z };
|