vitest 0.20.1 → 0.21.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/dist/browser.d.ts +9 -1882
- package/dist/browser.mjs +7 -7
- package/dist/{chunk-api-setup.7c4c8879.mjs → chunk-api-setup.89eb0e7a.mjs} +5 -5
- package/dist/{chunk-constants.16825f0c.mjs → chunk-constants.9da1ef26.mjs} +1 -1
- package/dist/{chunk-defaults.1c51d585.mjs → chunk-defaults.8390340d.mjs} +2 -2
- package/dist/{chunk-integrations-globals.56a11010.mjs → chunk-integrations-globals.a798d352.mjs} +6 -6
- package/dist/{chunk-mock-date.9160e13b.mjs → chunk-mock-date.ea3b3121.mjs} +10 -7
- package/dist/{chunk-node-git.43dbdd42.mjs → chunk-node-git.e0dc0a7e.mjs} +1 -1
- package/dist/{chunk-runtime-chain.b6c2cdbc.mjs → chunk-runtime-chain.44b4224d.mjs} +30 -21
- package/dist/{chunk-runtime-error.0aa0dc06.mjs → chunk-runtime-error.95e53764.mjs} +12 -11
- package/dist/{chunk-runtime-hooks.3ee34848.mjs → chunk-runtime-hooks.291644ec.mjs} +4 -4
- package/dist/{chunk-runtime-mocker.0a8f7c5e.mjs → chunk-runtime-mocker.6190d6a3.mjs} +19 -11
- package/dist/{chunk-runtime-rpc.dbf0b31d.mjs → chunk-runtime-rpc.fc50dcc0.mjs} +1 -1
- package/dist/{chunk-utils-source-map.8198ebd9.mjs → chunk-utils-source-map.d307e4ea.mjs} +1 -1
- package/dist/{chunk-vite-node-client.a247c2c2.mjs → chunk-vite-node-client.b59ba135.mjs} +2 -2
- package/dist/{chunk-vite-node-debug.c5887932.mjs → chunk-vite-node-debug.dbce2e1f.mjs} +1 -1
- package/dist/{chunk-vite-node-externalize.fce5b934.mjs → chunk-vite-node-externalize.80bed9b3.mjs} +36 -19
- package/dist/{chunk-vite-node-utils.9dfd1e3f.mjs → chunk-vite-node-utils.96438e82.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/config.d.ts +2 -67
- package/dist/entry.mjs +7 -7
- package/dist/global-644546f7.d.ts +1777 -0
- package/dist/index-3f764034.d.ts +164 -0
- package/dist/index.d.ts +29 -1898
- package/dist/index.mjs +5 -5
- package/dist/loader.mjs +72 -15
- package/dist/mocker-5e2a8e41.d.ts +3 -0
- package/dist/node.d.ts +7 -1662
- package/dist/node.mjs +8 -8
- package/dist/suite.mjs +4 -4
- package/dist/worker.mjs +6 -6
- package/package.json +10 -10
package/dist/{chunk-vite-node-externalize.fce5b934.mjs → chunk-vite-node-externalize.80bed9b3.mjs}
RENAMED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { j as join, z as basename, d as dirname,
|
|
2
|
-
import { p as pLimit, c as configDefaults, r as resolveC8Options, a as cleanCoverage, b as reportCoverage, d as envPackageNames } from './chunk-defaults.
|
|
1
|
+
import { y as resolve, j as join, z as basename, d as dirname, A as AggregateErrorPonyfill, p as picocolors, B as isAbsolute, C as relative, s as slash$2, l as isNode, o as relativePath, D as getTests, e as getFullName, x as hasFailed, E as hasFailedSnapshot, F as getSuites, v as shuffle, t as toArray$1, G as normalize, n as noop$1, H as deepMerge, I as toNamespacedPath, g as getCallLastIndex, f as notNullish, J as ensurePackageInstalled, K as stdout } from './chunk-mock-date.ea3b3121.mjs';
|
|
2
|
+
import { p as pLimit, c as configDefaults, r as resolveC8Options, a as cleanCoverage, b as reportCoverage, d as envPackageNames } from './chunk-defaults.8390340d.mjs';
|
|
3
3
|
import { loadConfigFromFile, createServer, mergeConfig } from 'vite';
|
|
4
4
|
import path$a from 'path';
|
|
5
5
|
import _url, { fileURLToPath } from 'url';
|
|
6
6
|
import process$1 from 'process';
|
|
7
7
|
import fs$8, { promises, existsSync, readFileSync } from 'fs';
|
|
8
|
-
import { d as distDir, r as rootDir, c as configFiles, a as defaultPort } from './chunk-constants.
|
|
8
|
+
import { d as distDir, r as rootDir, c as configFiles, a as defaultPort } from './chunk-constants.9da1ef26.mjs';
|
|
9
9
|
import require$$0, { cpus, hostname } from 'os';
|
|
10
10
|
import util$2 from 'util';
|
|
11
11
|
import require$$0$1 from 'stream';
|
|
12
12
|
import require$$2 from 'events';
|
|
13
13
|
import { c as commonjsGlobal } from './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
14
|
-
import { c as createBirpc, V as ViteNodeRunner } from './chunk-vite-node-client.
|
|
14
|
+
import { c as createBirpc, V as ViteNodeRunner } from './chunk-vite-node-client.b59ba135.mjs';
|
|
15
15
|
import createDebug from 'debug';
|
|
16
|
-
import { i as isNodeBuiltin, a as isValidNodeImport, s as slash$1, t as toArray, b as toFilePath, w as withInlineSourcemap } from './chunk-vite-node-utils.
|
|
16
|
+
import { i as isNodeBuiltin, a as isValidNodeImport, s as slash$1, t as toArray, b as toFilePath, w as withInlineSourcemap } from './chunk-vite-node-utils.96438e82.mjs';
|
|
17
17
|
import { MessageChannel } from 'worker_threads';
|
|
18
18
|
import { Tinypool } from 'tinypool';
|
|
19
19
|
import { performance } from 'perf_hooks';
|
|
20
|
-
import { c as stripAnsi, d as cliTruncate, p as parseStacktrace, e as stringWidth, h as ansiStyles, i as sliceAnsi, j as interpretSourcePos, s as stringify$5, u as unifiedDiff, b as posToNumber, l as lineSplitRE } from './chunk-utils-source-map.
|
|
20
|
+
import { c as stripAnsi, d as cliTruncate, p as parseStacktrace, e as stringWidth, h as ansiStyles, i as sliceAnsi, j as interpretSourcePos, s as stringify$5, u as unifiedDiff, b as posToNumber, l as lineSplitRE } from './chunk-utils-source-map.d307e4ea.mjs';
|
|
21
21
|
import { b as safeSetInterval, c as safeClearInterval, s as safeSetTimeout, a as safeClearTimeout } from './chunk-utils-timers.b48455ed.mjs';
|
|
22
22
|
import { resolveModule } from 'local-pkg';
|
|
23
23
|
import { createHash } from 'crypto';
|
|
@@ -26,7 +26,7 @@ import MagicString from './chunk-magic-string.efe26975.mjs';
|
|
|
26
26
|
import require$$0$2 from 'readline';
|
|
27
27
|
import { p as prompts } from './vendor-index.de788b6a.mjs';
|
|
28
28
|
|
|
29
|
-
var version$1 = "0.
|
|
29
|
+
var version$1 = "0.21.0";
|
|
30
30
|
|
|
31
31
|
class EndError extends Error {
|
|
32
32
|
constructor(value) {
|
|
@@ -6850,14 +6850,14 @@ class ViteNodeServer {
|
|
|
6850
6850
|
}, options.debug ?? {});
|
|
6851
6851
|
}
|
|
6852
6852
|
if (options.debug)
|
|
6853
|
-
import('./chunk-vite-node-debug.
|
|
6853
|
+
import('./chunk-vite-node-debug.dbce2e1f.mjs').then((r) => this.debugger = new r.Debugger(server.config.root, options.debug));
|
|
6854
6854
|
}
|
|
6855
6855
|
shouldExternalize(id) {
|
|
6856
6856
|
return shouldExternalize(id, this.options.deps, this.externalizeCache);
|
|
6857
6857
|
}
|
|
6858
6858
|
async resolveId(id, importer) {
|
|
6859
6859
|
if (importer && !importer.startsWith(this.server.config.root))
|
|
6860
|
-
importer =
|
|
6860
|
+
importer = resolve(this.server.config.root, importer);
|
|
6861
6861
|
const mode = importer && this.getTransformMode(importer) || "ssr";
|
|
6862
6862
|
return this.server.pluginContainer.resolveId(id, importer, { ssr: mode === "ssr" });
|
|
6863
6863
|
}
|
|
@@ -7014,13 +7014,13 @@ function createPool(ctx) {
|
|
|
7014
7014
|
useAtomics: false,
|
|
7015
7015
|
maxThreads,
|
|
7016
7016
|
minThreads,
|
|
7017
|
-
execArgv: [
|
|
7017
|
+
execArgv: ctx.config.deps.registerNodeLoader ? [
|
|
7018
7018
|
"--require",
|
|
7019
7019
|
suppressLoaderWarningsPath,
|
|
7020
7020
|
"--experimental-loader",
|
|
7021
7021
|
loaderPath,
|
|
7022
7022
|
...conditions || []
|
|
7023
|
-
]
|
|
7023
|
+
] : []
|
|
7024
7024
|
};
|
|
7025
7025
|
if (ctx.config.isolate) {
|
|
7026
7026
|
options.isolateWorkers = true;
|
|
@@ -7292,6 +7292,9 @@ function elegantSpinner() {
|
|
|
7292
7292
|
return spinnerFrames[index];
|
|
7293
7293
|
};
|
|
7294
7294
|
}
|
|
7295
|
+
function formatTimeString(date) {
|
|
7296
|
+
return date.toTimeString().split(" ")[0];
|
|
7297
|
+
}
|
|
7295
7298
|
|
|
7296
7299
|
var _a;
|
|
7297
7300
|
const BADGE_PADDING = " ";
|
|
@@ -7313,6 +7316,7 @@ class BaseReporter {
|
|
|
7313
7316
|
this._filesInWatchMode = /* @__PURE__ */ new Map();
|
|
7314
7317
|
this._lastRunTimeout = 0;
|
|
7315
7318
|
this._lastRunCount = 0;
|
|
7319
|
+
this._timeStart = new Date();
|
|
7316
7320
|
this.registerUnhandledRejection();
|
|
7317
7321
|
}
|
|
7318
7322
|
onInit(ctx) {
|
|
@@ -7426,6 +7430,7 @@ ${BADGE}${TRIGGER}
|
|
|
7426
7430
|
${BADGE}${TRIGGER} ${picocolors.exports.blue(`x${rerun}`)}
|
|
7427
7431
|
`);
|
|
7428
7432
|
}
|
|
7433
|
+
this._timeStart = new Date();
|
|
7429
7434
|
this.start = performance.now();
|
|
7430
7435
|
}
|
|
7431
7436
|
onUserConsoleLog(log) {
|
|
@@ -7496,10 +7501,11 @@ ${BADGE}${TRIGGER} ${picocolors.exports.blue(`x${rerun}`)}
|
|
|
7496
7501
|
}
|
|
7497
7502
|
logger.log(padTitle("Test Files"), getStateString(files));
|
|
7498
7503
|
logger.log(padTitle("Tests"), getStateString(tests));
|
|
7504
|
+
logger.log(padTitle("Start at"), formatTimeString(this._timeStart));
|
|
7499
7505
|
if (this.watchFilters)
|
|
7500
|
-
logger.log(padTitle("
|
|
7506
|
+
logger.log(padTitle("Duration"), time(threadTime));
|
|
7501
7507
|
else
|
|
7502
|
-
logger.log(padTitle("
|
|
7508
|
+
logger.log(padTitle("Duration"), time(executionTime) + picocolors.exports.gray(` (setup ${time(setupTime)}, collect ${time(collectTime)}, tests ${time(testsTime)})`));
|
|
7503
7509
|
logger.log();
|
|
7504
7510
|
}
|
|
7505
7511
|
async printTaskErrors(tasks, errorDivider) {
|
|
@@ -8244,6 +8250,11 @@ function createReporters(reporterReferences, runner) {
|
|
|
8244
8250
|
return Promise.all(promisedReporters);
|
|
8245
8251
|
}
|
|
8246
8252
|
|
|
8253
|
+
const isAggregateError = (err) => {
|
|
8254
|
+
if (typeof AggregateError !== "undefined" && err instanceof AggregateError)
|
|
8255
|
+
return true;
|
|
8256
|
+
return err instanceof Error && "errors" in err;
|
|
8257
|
+
};
|
|
8247
8258
|
class StateManager {
|
|
8248
8259
|
constructor() {
|
|
8249
8260
|
this.filesMap = /* @__PURE__ */ new Map();
|
|
@@ -8254,6 +8265,8 @@ class StateManager {
|
|
|
8254
8265
|
this.errorsSet = /* @__PURE__ */ new Set();
|
|
8255
8266
|
}
|
|
8256
8267
|
catchError(err, type) {
|
|
8268
|
+
if (isAggregateError(err))
|
|
8269
|
+
return err.errors.forEach((error) => this.catchError(error, type));
|
|
8257
8270
|
err.type = type;
|
|
8258
8271
|
this.errorsSet.add(err);
|
|
8259
8272
|
}
|
|
@@ -8530,7 +8543,7 @@ function resolveApiConfig(options) {
|
|
|
8530
8543
|
return api;
|
|
8531
8544
|
}
|
|
8532
8545
|
function resolveConfig(options, viteConfig) {
|
|
8533
|
-
var _a, _b, _c, _d;
|
|
8546
|
+
var _a, _b, _c, _d, _e;
|
|
8534
8547
|
if (options.dom) {
|
|
8535
8548
|
if (((_a = viteConfig.test) == null ? void 0 : _a.environment) != null && viteConfig.test.environment !== "happy-dom") {
|
|
8536
8549
|
console.warn(picocolors.exports.yellow(`${picocolors.exports.inverse(picocolors.exports.yellow(" Vitest "))} Your config.test.environment ("${viteConfig.test.environment}") conflicts with --dom flag ("happy-dom"), ignoring "${viteConfig.test.environment}"`));
|
|
@@ -8567,6 +8580,7 @@ function resolveConfig(options, viteConfig) {
|
|
|
8567
8580
|
resolved.deps.inline.push(...extraInlineDeps);
|
|
8568
8581
|
}
|
|
8569
8582
|
}
|
|
8583
|
+
(_c = resolved.deps).registerNodeLoader ?? (_c.registerNodeLoader = false);
|
|
8570
8584
|
resolved.testNamePattern = resolved.testNamePattern ? resolved.testNamePattern instanceof RegExp ? resolved.testNamePattern : new RegExp(resolved.testNamePattern) : void 0;
|
|
8571
8585
|
const CI = !!process.env.CI;
|
|
8572
8586
|
const UPDATE_SNAPSHOT = resolved.update || process.env.UPDATE_SNAPSHOT;
|
|
@@ -8595,11 +8609,11 @@ function resolveConfig(options, viteConfig) {
|
|
|
8595
8609
|
resolved.passWithNoTests ?? (resolved.passWithNoTests = true);
|
|
8596
8610
|
resolved.css ?? (resolved.css = {});
|
|
8597
8611
|
if (typeof resolved.css === "object")
|
|
8598
|
-
(
|
|
8612
|
+
(_d = resolved.css).include ?? (_d.include = [/\.module\./]);
|
|
8599
8613
|
resolved.cache ?? (resolved.cache = { dir: "" });
|
|
8600
8614
|
if (resolved.cache)
|
|
8601
8615
|
resolved.cache.dir = VitestCache.resolveCacheDir(resolved.root, resolved.cache.dir);
|
|
8602
|
-
if (!((
|
|
8616
|
+
if (!((_e = resolved.sequence) == null ? void 0 : _e.sequencer)) {
|
|
8603
8617
|
resolved.sequence ?? (resolved.sequence = {});
|
|
8604
8618
|
resolved.sequence.sequencer = resolved.sequence.shuffle ? RandomSequencer : BaseSequencer;
|
|
8605
8619
|
}
|
|
@@ -9092,7 +9106,7 @@ createLogUpdate(process$1.stdout);
|
|
|
9092
9106
|
|
|
9093
9107
|
createLogUpdate(process$1.stderr);
|
|
9094
9108
|
|
|
9095
|
-
var version = "0.
|
|
9109
|
+
var version = "0.21.0";
|
|
9096
9110
|
|
|
9097
9111
|
function fileFromParsedStack(stack) {
|
|
9098
9112
|
var _a, _b;
|
|
@@ -9459,7 +9473,7 @@ class Vitest {
|
|
|
9459
9473
|
}
|
|
9460
9474
|
async filterTestsBySource(tests) {
|
|
9461
9475
|
if (this.config.changed && !this.config.related) {
|
|
9462
|
-
const { VitestGit } = await import('./chunk-node-git.
|
|
9476
|
+
const { VitestGit } = await import('./chunk-node-git.e0dc0a7e.mjs');
|
|
9463
9477
|
const vitestGit = new VitestGit(this.config.root);
|
|
9464
9478
|
const related2 = await vitestGit.findChangedFiles({
|
|
9465
9479
|
changedSince: this.config.changed
|
|
@@ -9961,6 +9975,9 @@ async function VitestPlugin(options = {}, ctx = new Vitest()) {
|
|
|
9961
9975
|
{
|
|
9962
9976
|
name: "vitest",
|
|
9963
9977
|
enforce: "pre",
|
|
9978
|
+
options() {
|
|
9979
|
+
this.meta.watchMode = false;
|
|
9980
|
+
},
|
|
9964
9981
|
config(viteConfig) {
|
|
9965
9982
|
const preOptions = deepMerge({}, configDefaults, options, viteConfig.test ?? {});
|
|
9966
9983
|
preOptions.api = resolveApiConfig(preOptions);
|
|
@@ -10045,7 +10062,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest()) {
|
|
|
10045
10062
|
await ctx.setServer(options, server);
|
|
10046
10063
|
haveStarted = true;
|
|
10047
10064
|
if (options.api && options.watch)
|
|
10048
|
-
(await import('./chunk-api-setup.
|
|
10065
|
+
(await import('./chunk-api-setup.89eb0e7a.mjs')).setup(ctx);
|
|
10049
10066
|
} catch (err) {
|
|
10050
10067
|
ctx.logger.printError(err, true);
|
|
10051
10068
|
process.exit(1);
|
|
@@ -4,7 +4,7 @@ import { pathToFileURL, fileURLToPath as fileURLToPath$1, URL as URL$1 } from 'u
|
|
|
4
4
|
import fs, { promises, statSync, existsSync, realpathSync, Stats } from 'fs';
|
|
5
5
|
import assert from 'assert';
|
|
6
6
|
import { format, inspect } from 'util';
|
|
7
|
-
import { y as resolve$1 } from './chunk-mock-date.
|
|
7
|
+
import { y as resolve$1 } from './chunk-mock-date.ea3b3121.mjs';
|
|
8
8
|
|
|
9
9
|
function normalizeWindowsPath(input = "") {
|
|
10
10
|
if (!input.includes("\\")) {
|
|
@@ -1111,4 +1111,4 @@ function toArray(array) {
|
|
|
1111
1111
|
return [array];
|
|
1112
1112
|
}
|
|
1113
1113
|
|
|
1114
|
-
export { isValidNodeImport as a, toFilePath as b, isPrimitive as c, normalizeModuleId as d, isNodeBuiltin as i, mergeSlashes as m, normalizeRequestId as n, slash as s, toArray as t, withInlineSourcemap as w };
|
|
1114
|
+
export { isValidNodeImport as a, toFilePath as b, isPrimitive as c, normalizeModuleId as d, hasCJSSyntax as h, isNodeBuiltin as i, mergeSlashes as m, normalizeRequestId as n, slash as s, toArray as t, withInlineSourcemap as w };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { p as picocolors } from './chunk-mock-date.
|
|
3
|
-
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.
|
|
2
|
+
import { p as picocolors } from './chunk-mock-date.ea3b3121.mjs';
|
|
3
|
+
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.80bed9b3.mjs';
|
|
4
4
|
import 'path';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
|
7
|
-
import './chunk-defaults.
|
|
7
|
+
import './chunk-defaults.8390340d.mjs';
|
|
8
8
|
import 'fs';
|
|
9
9
|
import 'module';
|
|
10
10
|
import 'url';
|
|
11
11
|
import 'vite';
|
|
12
12
|
import 'process';
|
|
13
|
-
import './chunk-constants.
|
|
13
|
+
import './chunk-constants.9da1ef26.mjs';
|
|
14
14
|
import 'os';
|
|
15
15
|
import 'util';
|
|
16
16
|
import 'stream';
|
|
17
17
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
18
|
-
import './chunk-vite-node-client.
|
|
18
|
+
import './chunk-vite-node-client.b59ba135.mjs';
|
|
19
19
|
import 'vm';
|
|
20
|
-
import './chunk-vite-node-utils.
|
|
20
|
+
import './chunk-vite-node-utils.96438e82.mjs';
|
|
21
21
|
import 'assert';
|
|
22
22
|
import 'debug';
|
|
23
23
|
import 'worker_threads';
|
|
24
24
|
import 'tinypool';
|
|
25
25
|
import 'perf_hooks';
|
|
26
|
-
import './chunk-utils-source-map.
|
|
26
|
+
import './chunk-utils-source-map.d307e4ea.mjs';
|
|
27
27
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
28
28
|
import 'crypto';
|
|
29
29
|
import './vendor-index.61438b77.mjs';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,72 +1,7 @@
|
|
|
1
1
|
import { UserConfig as UserConfig$2, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv } from 'vite';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
// Type definitions for @sinonjs/fake-timers 8.1
|
|
6
|
-
// Project: https://github.com/sinonjs/fake-timers
|
|
7
|
-
// Definitions by: Wim Looman <https://github.com/Nemo157>
|
|
8
|
-
// Rogier Schouten <https://github.com/rogierschouten>
|
|
9
|
-
// Yishai Zehavi <https://github.com/zyishai>
|
|
10
|
-
// Remco Haszing <https://github.com/remcohaszing>
|
|
11
|
-
// Jaden Simon <https://github.com/JadenSimon>
|
|
12
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
13
|
-
// TypeScript Version: 2.3
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Names of clock methods that may be faked by install.
|
|
17
|
-
*/
|
|
18
|
-
type FakeMethod =
|
|
19
|
-
| 'setTimeout'
|
|
20
|
-
| 'clearTimeout'
|
|
21
|
-
| 'setImmediate'
|
|
22
|
-
| 'clearImmediate'
|
|
23
|
-
| 'setInterval'
|
|
24
|
-
| 'clearInterval'
|
|
25
|
-
| 'Date'
|
|
26
|
-
| 'nextTick'
|
|
27
|
-
| 'hrtime'
|
|
28
|
-
| 'requestAnimationFrame'
|
|
29
|
-
| 'cancelAnimationFrame'
|
|
30
|
-
| 'requestIdleCallback'
|
|
31
|
-
| 'cancelIdleCallback'
|
|
32
|
-
| 'performance'
|
|
33
|
-
| 'queueMicrotask';
|
|
34
|
-
|
|
35
|
-
interface FakeTimerInstallOpts {
|
|
36
|
-
/**
|
|
37
|
-
* Installs fake timers with the specified unix epoch (default: 0)
|
|
38
|
-
*/
|
|
39
|
-
now?: number | Date | undefined;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* An array with names of global methods and APIs to fake. By default, `@sinonjs/fake-timers` does not replace `nextTick()` and `queueMicrotask()`.
|
|
43
|
-
* For instance, `FakeTimers.install({ toFake: ['setTimeout', 'nextTick'] })` will fake only `setTimeout()` and `nextTick()`
|
|
44
|
-
*/
|
|
45
|
-
toFake?: FakeMethod[] | undefined;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The maximum number of timers that will be run when calling runAll() (default: 1000)
|
|
49
|
-
*/
|
|
50
|
-
loopLimit?: number | undefined;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Tells @sinonjs/fake-timers to increment mocked time automatically based on the real system time shift (e.g. the mocked time will be incremented by
|
|
54
|
-
* 20ms for every 20ms change in the real system time) (default: false)
|
|
55
|
-
*/
|
|
56
|
-
shouldAdvanceTime?: boolean | undefined;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Relevant only when using with shouldAdvanceTime: true. increment mocked time by advanceTimeDelta ms every advanceTimeDelta ms change
|
|
60
|
-
* in the real system time (default: 20)
|
|
61
|
-
*/
|
|
62
|
-
advanceTimeDelta?: number | undefined;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers. These are not cleared by
|
|
66
|
-
* default, leading to potentially unexpected behavior if timers existed prior to installing FakeTimers. (default: false)
|
|
67
|
-
*/
|
|
68
|
-
shouldClearNativeTimers?: boolean | undefined;
|
|
69
|
-
}
|
|
3
|
+
import { U as UserConfig$1, a1 as ResolvedC8Options, F as FakeTimerInstallOpts } from './global-644546f7.js';
|
|
4
|
+
import 'fs';
|
|
70
5
|
|
|
71
6
|
declare const config: {
|
|
72
7
|
allowOnly: boolean;
|
package/dist/entry.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import { a as resetModules } from './chunk-mock-date.
|
|
3
|
-
import { f as envs } from './chunk-defaults.
|
|
4
|
-
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-error.
|
|
2
|
+
import { a as resetModules } from './chunk-mock-date.ea3b3121.mjs';
|
|
3
|
+
import { f as envs } from './chunk-defaults.8390340d.mjs';
|
|
4
|
+
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-error.95e53764.mjs';
|
|
5
5
|
import { g as getWorkerState } from './chunk-utils-global.fa20c2f6.mjs';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'tty';
|
|
8
8
|
import 'local-pkg';
|
|
9
9
|
import 'module';
|
|
10
10
|
import 'url';
|
|
11
|
-
import './chunk-runtime-hooks.
|
|
12
|
-
import './chunk-runtime-chain.
|
|
11
|
+
import './chunk-runtime-hooks.291644ec.mjs';
|
|
12
|
+
import './chunk-runtime-chain.44b4224d.mjs';
|
|
13
13
|
import 'util';
|
|
14
14
|
import 'chai';
|
|
15
15
|
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
16
|
-
import './chunk-runtime-rpc.
|
|
16
|
+
import './chunk-runtime-rpc.fc50dcc0.mjs';
|
|
17
17
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
18
|
-
import './chunk-utils-source-map.
|
|
18
|
+
import './chunk-utils-source-map.d307e4ea.mjs';
|
|
19
19
|
import './spy.mjs';
|
|
20
20
|
import 'tinyspy';
|
|
21
21
|
|