vitest 0.25.3 → 0.25.5
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 +3 -3
- package/dist/browser.js +10 -9
- package/dist/{chunk-api-setup.c9f38753.js → chunk-api-setup.995f6ab7.js} +4 -2
- package/dist/{chunk-integrations-globals.1e636d22.js → chunk-integrations-globals.57158eb5.js} +7 -7
- package/dist/{chunk-runtime-chain.f993b1dc.js → chunk-runtime-chain.dd978482.js} +8 -7
- package/dist/{chunk-runtime-error.6287172c.js → chunk-runtime-error.616e92ca.js} +2 -2
- package/dist/{chunk-runtime-mocker.c4d85347.js → chunk-runtime-mocker.34e72575.js} +34 -18
- package/dist/{chunk-runtime-rpc.1e7530d3.js → chunk-runtime-rpc.42aebbb9.js} +2 -2
- package/dist/chunk-runtime-setup.bd2deed4.js +659 -0
- package/dist/{chunk-runtime-test-state.de4d6ff8.js → chunk-runtime-test-state.0037e2e0.js} +8 -6
- package/dist/{chunk-typecheck-constants.4891f22f.js → chunk-typecheck-constants.ed987901.js} +12 -2
- package/dist/{chunk-utils-source-map.c6dfbbc1.js → chunk-utils-source-map.29ff1088.js} +3 -1
- package/dist/{chunk-utils-timers.06f993db.js → chunk-utils-timers.793fd179.js} +2 -0
- package/dist/{chunk-vite-node-externalize.c57d0ad1.js → chunk-vite-node-externalize.ca4784be.js} +74 -33
- package/dist/{chunk-vite-node-client.58cb6bfa.js → chunk-vite-node-source-map.d0aa773d.js} +56 -18
- package/dist/{chunk-vite-node-utils.f6d73fbe.js → chunk-vite-node-utils.9047cb87.js} +4 -14
- package/dist/cli.js +8 -7
- package/dist/config.cjs +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/config.js +2 -1
- package/dist/entry.js +9 -8
- package/dist/environments.d.ts +1 -1
- package/dist/{index-9f5bc072.d.ts → index-2f15c9a8.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -7
- package/dist/loader.js +2 -2
- package/dist/node.d.ts +5 -4
- package/dist/node.js +9 -8
- package/dist/suite.js +6 -6
- package/dist/{types-de0e0997.d.ts → types-79a05dee.d.ts} +72 -24
- package/dist/{chunk-runtime-setup.667a5719.js → vendor-source-map-support.1ce17397.js} +1 -657
- package/dist/worker.js +9 -7
- package/package.json +4 -4
package/dist/environments.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpyImpl } from 'tinyspy';
|
|
2
|
-
import { w as SuiteAPI, v as TestAPI, aw as BenchmarkAPI, y as SuiteHooks, H as HookListener, L as TestContext, p as Suite, x as HookCleanupCallback, O as OnTestFailedHandler, q as Test } from './types-
|
|
2
|
+
import { w as SuiteAPI, v as TestAPI, aw as BenchmarkAPI, y as SuiteHooks, H as HookListener, L as TestContext, p as Suite, x as HookCleanupCallback, O as OnTestFailedHandler, q as Test } from './types-79a05dee.js';
|
|
3
3
|
|
|
4
4
|
declare type Not<T extends boolean> = T extends true ? false : true;
|
|
5
5
|
declare type And<Types extends boolean[]> = Types[number] extends true ? true : false;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as spyOn, f as fn, M as MaybeMockedDeep, a as MaybeMocked, b as MaybePartiallyMocked, c as MaybePartiallyMockedDeep, E as EnhancedSpy } from './index-
|
|
2
|
-
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, g as bench, 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-
|
|
3
|
-
import { D as DoneCallback, F as FakeTimerInstallOpts, R as RuntimeConfig, a as File, T as TaskResultPack, b as ResolvedConfig, M as ModuleGraphData, c as Reporter } from './types-
|
|
4
|
-
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable, ap as BaseCoverageOptions, av as BenchFunction, at as Benchmark, aw as BenchmarkAPI, au as BenchmarkResult, as as BenchmarkUserOptions, B as BuiltinEnvironment, i as CSSModuleScopeStrategy, C as CollectLineNumbers, f as CollectLines, ab as Constructable, h as Context, ar as CoverageC8Options, aq as CoverageIstanbulOptions, an as CoverageOptions, ak as CoverageProvider, al as CoverageProviderModule, am as CoverageReporter, a9 as DeepMerge, D as DoneCallback, ae as Environment, E as EnvironmentOptions, ad as EnvironmentReturn, ai as ErrorWithDiff, a as File, x as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, a8 as MergeInsertions, ac as ModuleCache, M as ModuleGraphData, aa as MutableArray, a5 as Nullable, aj as OnServerRestartHandler, O as OnTestFailedHandler, ah as ParsedStack, ag as Position, d as RawErrsMap, c as Reporter, a0 as ResolveIdFunction, b as ResolvedConfig, ao as ResolvedCoverageOptions, g as RootAndTarget, l 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, p as Suite, w as SuiteAPI, z as SuiteCollector, G as SuiteFactory, y as SuiteHooks, s as Task, n as TaskBase, o as TaskResult, T as TaskResultPack, m as TaskState, q as Test, v as TestAPI, L as TestContext, t as TestFunction, u as TestOptions, e as TscErrorInfo, r as TypeCheck, k as TypecheckConfig, Z as UncheckedSnapshot, U as UserConfig, af as UserConsoleLog, N as Vitest, V as VitestEnvironment, j as VitestRunMode, $ as WorkerContext, a3 as WorkerGlobalState, a2 as WorkerRPC } from './types-
|
|
1
|
+
import { s as spyOn, f as fn, M as MaybeMockedDeep, a as MaybeMocked, b as MaybePartiallyMocked, c as MaybePartiallyMockedDeep, E as EnhancedSpy } from './index-2f15c9a8.js';
|
|
2
|
+
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, g as bench, 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-2f15c9a8.js';
|
|
3
|
+
import { D as DoneCallback, F as FakeTimerInstallOpts, R as RuntimeConfig, a as File, T as TaskResultPack, b as ResolvedConfig, M as ModuleGraphData, c as Reporter } from './types-79a05dee.js';
|
|
4
|
+
export { a1 as AfterSuiteRunMeta, A as ApiConfig, a7 as ArgumentsType, a6 as Arrayable, a4 as Awaitable, ap as BaseCoverageOptions, av as BenchFunction, at as Benchmark, aw as BenchmarkAPI, au as BenchmarkResult, as as BenchmarkUserOptions, B as BuiltinEnvironment, i as CSSModuleScopeStrategy, C as CollectLineNumbers, f as CollectLines, ab as Constructable, h as Context, ar as CoverageC8Options, aq as CoverageIstanbulOptions, an as CoverageOptions, ak as CoverageProvider, al as CoverageProviderModule, am as CoverageReporter, a9 as DeepMerge, D as DoneCallback, ae as Environment, E as EnvironmentOptions, ad as EnvironmentReturn, ai as ErrorWithDiff, a as File, x as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, a8 as MergeInsertions, ac as ModuleCache, M as ModuleGraphData, aa as MutableArray, a5 as Nullable, aj as OnServerRestartHandler, O as OnTestFailedHandler, ah as ParsedStack, ag as Position, d as RawErrsMap, c as Reporter, a0 as ResolveIdFunction, b as ResolvedConfig, ao as ResolvedCoverageOptions, g as RootAndTarget, l 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, p as Suite, w as SuiteAPI, z as SuiteCollector, G as SuiteFactory, y as SuiteHooks, s as Task, n as TaskBase, o as TaskResult, T as TaskResultPack, m as TaskState, q as Test, v as TestAPI, L as TestContext, t as TestFunction, u as TestOptions, e as TscErrorInfo, r as TypeCheck, k as TypecheckConfig, Z as UncheckedSnapshot, U as UserConfig, af as UserConsoleLog, N as Vitest, V as VitestEnvironment, j as VitestRunMode, $ as WorkerContext, a3 as WorkerGlobalState, a2 as WorkerRPC } from './types-79a05dee.js';
|
|
5
5
|
import { TransformResult } from 'vite';
|
|
6
6
|
import * as chai from 'chai';
|
|
7
7
|
export { chai };
|
|
@@ -146,7 +146,7 @@ declare class VitestUtils {
|
|
|
146
146
|
/**
|
|
147
147
|
* Wait for all imports to load.
|
|
148
148
|
* Useful, if you have a synchronous call that starts
|
|
149
|
-
* importing a module
|
|
149
|
+
* importing a module that you cannot wait otherwise.
|
|
150
150
|
*/
|
|
151
151
|
dynamicImportSettled(): Promise<void>;
|
|
152
152
|
private _config;
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export { b as bench, 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-runtime-test-state.
|
|
3
|
-
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, k as getRunningMode, h as isFirstRun, l as isWatchMode, o as onTestFailed, g as runOnce, v as vi, j as vitest, w as withCallback } from './chunk-runtime-test-state.
|
|
1
|
+
export { b as bench, c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.dd978482.js';
|
|
2
|
+
import { e as dist } from './chunk-runtime-test-state.0037e2e0.js';
|
|
3
|
+
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, k as getRunningMode, h as isFirstRun, l as isWatchMode, o as onTestFailed, g as runOnce, v as vi, j as vitest, w as withCallback } from './chunk-runtime-test-state.0037e2e0.js';
|
|
4
4
|
import * as chai from 'chai';
|
|
5
5
|
export { chai };
|
|
6
6
|
export { assert, should } from 'chai';
|
|
7
7
|
import 'util';
|
|
8
|
-
import './chunk-typecheck-constants.
|
|
8
|
+
import './chunk-typecheck-constants.ed987901.js';
|
|
9
9
|
import 'path';
|
|
10
10
|
import './chunk-utils-env.03f840f2.js';
|
|
11
11
|
import 'tty';
|
|
12
12
|
import 'url';
|
|
13
13
|
import 'local-pkg';
|
|
14
14
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
15
|
-
import './chunk-runtime-rpc.
|
|
16
|
-
import './chunk-utils-timers.
|
|
15
|
+
import './chunk-runtime-rpc.42aebbb9.js';
|
|
16
|
+
import './chunk-utils-timers.793fd179.js';
|
|
17
17
|
import 'fs';
|
|
18
|
-
import './chunk-utils-source-map.
|
|
18
|
+
import './chunk-utils-source-map.29ff1088.js';
|
|
19
19
|
import './spy.js';
|
|
20
20
|
import 'tinyspy';
|
|
21
21
|
|
package/dist/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { pathToFileURL } from 'url';
|
|
2
2
|
import { readFile } from 'fs/promises';
|
|
3
|
-
import { i as isNodeBuiltin,
|
|
4
|
-
import { g as getWorkerState } from './chunk-typecheck-constants.
|
|
3
|
+
import { i as isNodeBuiltin, n as normalizeModuleId, h as hasCJSSyntax } from './chunk-vite-node-utils.9047cb87.js';
|
|
4
|
+
import { g as getWorkerState } from './chunk-typecheck-constants.ed987901.js';
|
|
5
5
|
import 'fs';
|
|
6
6
|
import './chunk-utils-env.03f840f2.js';
|
|
7
7
|
import 'tty';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as VitestRunMode, U as UserConfig, N as Vitest, ax as ModuleCacheMap, ay as ViteNodeRunnerOptions, az as MockMap, aA as ViteNodeRunner, aB as TestSequencer } from './types-
|
|
2
|
-
export { aB as TestSequencer, aD as TestSequencerConstructor, N as Vitest, aC as startVitest } from './types-
|
|
1
|
+
import { j as VitestRunMode, U as UserConfig, N as Vitest, ax as ModuleCacheMap, ay as ViteNodeRunnerOptions, az as MockMap, aA as ViteNodeRunner, aB as TestSequencer } from './types-79a05dee.js';
|
|
2
|
+
export { aB as TestSequencer, aD as TestSequencerConstructor, N as Vitest, aC as startVitest } from './types-79a05dee.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import 'tinybench';
|
|
5
5
|
import 'fs';
|
|
@@ -20,6 +20,7 @@ declare class VitestMocker {
|
|
|
20
20
|
private request;
|
|
21
21
|
private static pendingIds;
|
|
22
22
|
private static spyModule?;
|
|
23
|
+
private resolveCache;
|
|
23
24
|
constructor(options: ExecuteOptions, moduleCache: ModuleCacheMap, request: ViteRunnerRequest);
|
|
24
25
|
private get root();
|
|
25
26
|
private get base();
|
|
@@ -36,9 +37,9 @@ declare class VitestMocker {
|
|
|
36
37
|
normalizePath(path: string): string;
|
|
37
38
|
getFsPath(path: string, external: string | null): string;
|
|
38
39
|
resolveMockPath(mockPath: string, external: string | null): string | null;
|
|
39
|
-
mockObject(object: Record<
|
|
40
|
+
mockObject(object: Record<Key, any>, mockExports?: Record<Key, any>): Record<Key, any>;
|
|
40
41
|
unmockPath(path: string): void;
|
|
41
|
-
mockPath(path: string, external: string | null, factory?: () => any): void;
|
|
42
|
+
mockPath(originalId: string, path: string, external: string | null, factory?: () => any): void;
|
|
42
43
|
importActual<T>(id: string, importer: string): Promise<T>;
|
|
43
44
|
importMock(id: string, importer: string): Promise<any>;
|
|
44
45
|
private ensureSpy;
|
package/dist/node.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.
|
|
2
|
-
export { V as VitestRunner } from './chunk-runtime-mocker.
|
|
1
|
+
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.ca4784be.js';
|
|
2
|
+
export { V as VitestRunner } from './chunk-runtime-mocker.34e72575.js';
|
|
3
3
|
import './chunk-utils-env.03f840f2.js';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'url';
|
|
@@ -8,7 +8,7 @@ import './chunk-integrations-coverage.befed097.js';
|
|
|
8
8
|
import 'local-pkg';
|
|
9
9
|
import './chunk-env-node.67948209.js';
|
|
10
10
|
import 'console';
|
|
11
|
-
import './chunk-typecheck-constants.
|
|
11
|
+
import './chunk-typecheck-constants.ed987901.js';
|
|
12
12
|
import 'vite';
|
|
13
13
|
import 'process';
|
|
14
14
|
import 'fs';
|
|
@@ -17,25 +17,26 @@ import 'util';
|
|
|
17
17
|
import 'stream';
|
|
18
18
|
import 'events';
|
|
19
19
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
20
|
-
import './chunk-vite-node-
|
|
20
|
+
import './chunk-vite-node-source-map.d0aa773d.js';
|
|
21
21
|
import 'module';
|
|
22
22
|
import 'vm';
|
|
23
|
-
import './chunk-vite-node-utils.
|
|
23
|
+
import './chunk-vite-node-utils.9047cb87.js';
|
|
24
24
|
import 'acorn';
|
|
25
25
|
import 'assert';
|
|
26
26
|
import 'debug';
|
|
27
|
+
import './vendor-source-map-support.1ce17397.js';
|
|
28
|
+
import 'source-map';
|
|
27
29
|
import 'perf_hooks';
|
|
28
30
|
import 'fs/promises';
|
|
29
31
|
import './vendor-index.737c3cff.js';
|
|
30
32
|
import 'buffer';
|
|
31
33
|
import 'child_process';
|
|
32
34
|
import './vendor-index.e1d4cf84.js';
|
|
33
|
-
import 'source-map';
|
|
34
35
|
import 'acorn-walk';
|
|
35
36
|
import 'worker_threads';
|
|
36
37
|
import 'tinypool';
|
|
37
|
-
import './chunk-utils-timers.
|
|
38
|
-
import './chunk-utils-source-map.
|
|
38
|
+
import './chunk-utils-timers.793fd179.js';
|
|
39
|
+
import './chunk-utils-source-map.29ff1088.js';
|
|
39
40
|
import 'crypto';
|
|
40
41
|
import './vendor-index.9c919048.js';
|
|
41
42
|
import './chunk-magic-string.ffe2b171.js';
|
package/dist/suite.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import 'util';
|
|
2
|
-
import '
|
|
3
|
-
|
|
2
|
+
import 'chai';
|
|
3
|
+
import './chunk-typecheck-constants.ed987901.js';
|
|
4
|
+
export { b as bench, f as clearCollectorContext, q as createSuiteHooks, h as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.dd978482.js';
|
|
4
5
|
import 'path';
|
|
5
6
|
import './chunk-utils-env.03f840f2.js';
|
|
6
7
|
import 'tty';
|
|
7
8
|
import 'url';
|
|
8
9
|
import 'local-pkg';
|
|
9
|
-
import 'chai';
|
|
10
10
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
11
|
-
import './chunk-runtime-rpc.
|
|
12
|
-
import './chunk-utils-timers.
|
|
11
|
+
import './chunk-runtime-rpc.42aebbb9.js';
|
|
12
|
+
import './chunk-utils-timers.793fd179.js';
|
|
13
13
|
import 'fs';
|
|
14
|
-
import './chunk-utils-source-map.
|
|
14
|
+
import './chunk-utils-source-map.29ff1088.js';
|
|
15
15
|
import './spy.js';
|
|
16
16
|
import 'tinyspy';
|
|
@@ -267,7 +267,7 @@ declare class ModuleCacheMap extends Map<string, ModuleCache$1> {
|
|
|
267
267
|
/**
|
|
268
268
|
* Return parsed source map based on inlined source map of the module
|
|
269
269
|
*/
|
|
270
|
-
getSourceMap(id: string):
|
|
270
|
+
getSourceMap(id: string): RawSourceMap | null;
|
|
271
271
|
}
|
|
272
272
|
declare class ViteNodeRunner {
|
|
273
273
|
options: ViteNodeRunnerOptions;
|
|
@@ -281,7 +281,7 @@ declare class ViteNodeRunner {
|
|
|
281
281
|
constructor(options: ViteNodeRunnerOptions);
|
|
282
282
|
executeFile(file: string): Promise<any>;
|
|
283
283
|
executeId(id: string): Promise<any>;
|
|
284
|
-
getSourceMap(id: string):
|
|
284
|
+
getSourceMap(id: string): RawSourceMap | null;
|
|
285
285
|
/** @internal */
|
|
286
286
|
cachedRequest(rawId: string, callstack: string[]): Promise<any>;
|
|
287
287
|
/** @internal */
|
|
@@ -323,6 +323,8 @@ interface FetchResult {
|
|
|
323
323
|
code?: string;
|
|
324
324
|
externalize?: string;
|
|
325
325
|
map?: RawSourceMap;
|
|
326
|
+
id?: string;
|
|
327
|
+
file?: string;
|
|
326
328
|
}
|
|
327
329
|
declare type HotContext = Omit<ViteHotContext, 'acceptDeps' | 'decline'>;
|
|
328
330
|
declare type FetchFunction = (id: string) => Promise<FetchResult>;
|
|
@@ -331,6 +333,7 @@ declare type CreateHotContextFunction = (runner: ViteNodeRunner, url: string) =>
|
|
|
331
333
|
interface ModuleCache$1 {
|
|
332
334
|
promise?: Promise<any>;
|
|
333
335
|
exports?: any;
|
|
336
|
+
evaluated?: boolean;
|
|
334
337
|
code?: string;
|
|
335
338
|
map?: RawSourceMap;
|
|
336
339
|
/**
|
|
@@ -792,6 +795,7 @@ declare class JUnitReporter implements Reporter {
|
|
|
792
795
|
private reportFile?;
|
|
793
796
|
private baseLog;
|
|
794
797
|
private logger;
|
|
798
|
+
private _timeStart;
|
|
795
799
|
onInit(ctx: Vitest): Promise<void>;
|
|
796
800
|
writeElement(name: string, attrs: Record<string, any>, children: () => Promise<void>): Promise<void>;
|
|
797
801
|
writeErrorDetails(error: ErrorWithDiff): Promise<void>;
|
|
@@ -1475,13 +1479,35 @@ declare type ResolvedCoverageOptions = {
|
|
|
1475
1479
|
} & Required<CoverageOptions>;
|
|
1476
1480
|
interface BaseCoverageOptions {
|
|
1477
1481
|
/**
|
|
1478
|
-
*
|
|
1482
|
+
* Enables coverage collection. Can be overriden using `--coverage` CLI option.
|
|
1479
1483
|
*
|
|
1480
1484
|
* @default false
|
|
1481
1485
|
*/
|
|
1482
1486
|
enabled?: boolean;
|
|
1483
1487
|
/**
|
|
1484
|
-
*
|
|
1488
|
+
* List of files included in coverage as glob patterns
|
|
1489
|
+
*
|
|
1490
|
+
* @default ['**']
|
|
1491
|
+
*/
|
|
1492
|
+
include?: string[];
|
|
1493
|
+
/**
|
|
1494
|
+
* Extensions for files to be included in coverage
|
|
1495
|
+
*
|
|
1496
|
+
* @default ['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', '.vue', '.svelte']
|
|
1497
|
+
*/
|
|
1498
|
+
extension?: string | string[];
|
|
1499
|
+
/**
|
|
1500
|
+
* List of files excluded from coverage as glob patterns
|
|
1501
|
+
*/
|
|
1502
|
+
exclude?: string[];
|
|
1503
|
+
/**
|
|
1504
|
+
* Whether to include all files, including the untested ones into report
|
|
1505
|
+
*
|
|
1506
|
+
* @default false
|
|
1507
|
+
*/
|
|
1508
|
+
all?: boolean;
|
|
1509
|
+
/**
|
|
1510
|
+
* Clean coverage results before running tests
|
|
1485
1511
|
*
|
|
1486
1512
|
* @default true
|
|
1487
1513
|
*/
|
|
@@ -1497,56 +1523,62 @@ interface BaseCoverageOptions {
|
|
|
1497
1523
|
*/
|
|
1498
1524
|
reportsDirectory?: string;
|
|
1499
1525
|
/**
|
|
1500
|
-
*
|
|
1526
|
+
* Coverage reporters to use.
|
|
1527
|
+
* See [istanbul documentation](https://istanbul.js.org/docs/advanced/alternative-reporters/) for detailed list of all reporters.
|
|
1501
1528
|
*
|
|
1502
|
-
* @default 'text'
|
|
1529
|
+
* @default ['text', 'html', 'clover', 'json']
|
|
1503
1530
|
*/
|
|
1504
1531
|
reporter?: Arrayable<CoverageReporter>;
|
|
1505
|
-
/**
|
|
1506
|
-
* List of files included in coverage as glob patterns
|
|
1507
|
-
*/
|
|
1508
|
-
include?: string[];
|
|
1509
|
-
/**
|
|
1510
|
-
* List of files excluded from coverage as glob patterns
|
|
1511
|
-
*/
|
|
1512
|
-
exclude?: string[];
|
|
1513
1532
|
/**
|
|
1514
1533
|
* Do not show files with 100% statement, branch, and function coverage
|
|
1534
|
+
*
|
|
1535
|
+
* @default false
|
|
1515
1536
|
*/
|
|
1516
1537
|
skipFull?: boolean;
|
|
1517
1538
|
/**
|
|
1518
|
-
* Check thresholds per file
|
|
1539
|
+
* Check thresholds per file.
|
|
1540
|
+
* See `lines`, `functions`, `branches` and `statements` for the actual thresholds.
|
|
1519
1541
|
*
|
|
1520
1542
|
* @default false
|
|
1521
1543
|
*/
|
|
1522
1544
|
perFile?: boolean;
|
|
1523
1545
|
/**
|
|
1524
1546
|
* Threshold for lines
|
|
1547
|
+
*
|
|
1548
|
+
* @default undefined
|
|
1525
1549
|
*/
|
|
1526
1550
|
lines?: number;
|
|
1527
1551
|
/**
|
|
1528
1552
|
* Threshold for functions
|
|
1553
|
+
*
|
|
1554
|
+
* @default undefined
|
|
1529
1555
|
*/
|
|
1530
1556
|
functions?: number;
|
|
1531
1557
|
/**
|
|
1532
1558
|
* Threshold for branches
|
|
1559
|
+
*
|
|
1560
|
+
* @default undefined
|
|
1533
1561
|
*/
|
|
1534
1562
|
branches?: number;
|
|
1535
1563
|
/**
|
|
1536
1564
|
* Threshold for statements
|
|
1565
|
+
*
|
|
1566
|
+
* @default undefined
|
|
1537
1567
|
*/
|
|
1538
1568
|
statements?: number;
|
|
1569
|
+
}
|
|
1570
|
+
interface CoverageIstanbulOptions extends BaseCoverageOptions {
|
|
1539
1571
|
/**
|
|
1540
|
-
*
|
|
1572
|
+
* Set to array of class method names to ignore for coverage
|
|
1573
|
+
*
|
|
1574
|
+
* @default []
|
|
1541
1575
|
*/
|
|
1542
|
-
|
|
1576
|
+
ignoreClassMethods?: string[];
|
|
1543
1577
|
/**
|
|
1544
|
-
*
|
|
1578
|
+
* Watermarks for statements, lines, branches and functions.
|
|
1579
|
+
*
|
|
1580
|
+
* Default value is `[50,80]` for each property.
|
|
1545
1581
|
*/
|
|
1546
|
-
all?: boolean;
|
|
1547
|
-
}
|
|
1548
|
-
interface CoverageIstanbulOptions extends BaseCoverageOptions {
|
|
1549
|
-
ignoreClassMethods?: string[];
|
|
1550
1582
|
watermarks?: {
|
|
1551
1583
|
statements?: [number, number];
|
|
1552
1584
|
functions?: [number, number];
|
|
@@ -1560,14 +1592,24 @@ interface CoverageC8Options extends BaseCoverageOptions {
|
|
|
1560
1592
|
*
|
|
1561
1593
|
* @default false
|
|
1562
1594
|
*/
|
|
1563
|
-
allowExternal?:
|
|
1595
|
+
allowExternal?: boolean;
|
|
1564
1596
|
/**
|
|
1565
|
-
* Exclude coverage under
|
|
1597
|
+
* Exclude coverage under `/node_modules/`
|
|
1566
1598
|
*
|
|
1567
1599
|
* @default true
|
|
1568
1600
|
*/
|
|
1569
1601
|
excludeNodeModules?: boolean;
|
|
1602
|
+
/**
|
|
1603
|
+
* Specifies the directories that are used when `--all` is enabled.
|
|
1604
|
+
*
|
|
1605
|
+
* @default cwd
|
|
1606
|
+
*/
|
|
1570
1607
|
src?: string[];
|
|
1608
|
+
/**
|
|
1609
|
+
* Shortcut for `--check-coverage --lines 100 --functions 100 --branches 100 --statements 100`
|
|
1610
|
+
*
|
|
1611
|
+
* @default false
|
|
1612
|
+
*/
|
|
1571
1613
|
100?: boolean;
|
|
1572
1614
|
}
|
|
1573
1615
|
|
|
@@ -2050,6 +2092,12 @@ interface InlineConfig {
|
|
|
2050
2092
|
* Options for configuring typechecking test environment.
|
|
2051
2093
|
*/
|
|
2052
2094
|
typecheck?: Partial<TypecheckConfig>;
|
|
2095
|
+
/**
|
|
2096
|
+
* The number of milliseconds after which a test is considered slow and reported as such in the results.
|
|
2097
|
+
*
|
|
2098
|
+
* @default 300
|
|
2099
|
+
*/
|
|
2100
|
+
slowTestThreshold?: number;
|
|
2053
2101
|
}
|
|
2054
2102
|
interface TypecheckConfig {
|
|
2055
2103
|
/**
|