vitest 0.0.139 → 0.0.140
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 +24 -0
- package/dist/cli.js +10 -9
- package/dist/{constants-d24b670d.js → constants-124522a1.js} +2 -2
- package/dist/{diff-5dfc7eb4.js → diff-deb11fa7.js} +3 -2
- package/dist/entry.js +187 -16
- package/dist/{global-f971f18f.js → global-7907d87d.js} +7 -6
- package/dist/index-1b2eb03b.js +187 -0
- package/dist/index-3faf3d6e.js +8807 -0
- package/dist/{index-314cb4d9.js → index-4a8eca63.js} +2 -2
- package/dist/index-53aca3c1.js +205 -0
- package/dist/index-c037b40c.js +9272 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -6
- package/dist/node.d.ts +6 -6
- package/dist/node.js +12 -11
- package/dist/{setup-7a362fbc.js → setup-901b91d4.js} +65 -79
- package/dist/{vi-567ba572.js → vi-8e5d0623.js} +2 -2
- package/dist/worker.js +210 -190
- package/package.json +8 -6
- package/dist/index-21eabd8a.js +0 -8727
- package/dist/index-64aafe4b.js +0 -396
- package/dist/index-8cb72062.js +0 -9255
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViteDevServer, CommonServerOptions, TransformResult } from 'vite';
|
|
2
|
+
import { ViteNodeServer } from 'vite-node/server';
|
|
2
3
|
import { MessagePort } from 'worker_threads';
|
|
3
4
|
import { SpyImpl } from 'tinyspy';
|
|
4
5
|
export { Spy, SpyFn } from 'tinyspy';
|
|
@@ -300,12 +301,12 @@ declare class Vitest {
|
|
|
300
301
|
errorStream: NodeJS.WriteStream & {
|
|
301
302
|
fd: 2;
|
|
302
303
|
};
|
|
304
|
+
vitenode: ViteNodeServer;
|
|
303
305
|
invalidates: Set<string>;
|
|
304
306
|
changedTests: Set<string>;
|
|
305
307
|
visitedFilesMap: Map<string, RawSourceMap>;
|
|
306
308
|
runningPromise?: Promise<void>;
|
|
307
309
|
closingPromise?: Promise<void>;
|
|
308
|
-
externalizeCache: Map<string, Promise<string | false>>;
|
|
309
310
|
isFirstRun: boolean;
|
|
310
311
|
restartsCount: number;
|
|
311
312
|
private _onRestartListeners;
|
|
@@ -326,7 +327,6 @@ declare class Vitest {
|
|
|
326
327
|
report<T extends keyof Reporter>(name: T, ...args: ArgumentsType<Reporter[T]>): Promise<void>;
|
|
327
328
|
globTestFiles(filters?: string[]): Promise<string[]>;
|
|
328
329
|
isTargetFile(id: string): boolean;
|
|
329
|
-
shouldExternalize(id: string): Promise<string | false>;
|
|
330
330
|
onServerRestarted(fn: () => void): void;
|
|
331
331
|
}
|
|
332
332
|
|
|
@@ -845,6 +845,10 @@ interface InlineConfig {
|
|
|
845
845
|
* Path to setup files
|
|
846
846
|
*/
|
|
847
847
|
setupFiles?: string | string[];
|
|
848
|
+
/**
|
|
849
|
+
* Path to global setup files
|
|
850
|
+
*/
|
|
851
|
+
globalSetup?: string | string[];
|
|
848
852
|
/**
|
|
849
853
|
* Pattern of file paths to be ignore from triggering watch rerun
|
|
850
854
|
*
|
|
@@ -954,10 +958,6 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters'
|
|
|
954
958
|
filters?: string[];
|
|
955
959
|
testNamePattern?: RegExp;
|
|
956
960
|
related?: string[];
|
|
957
|
-
depsInline: (string | RegExp)[];
|
|
958
|
-
depsExternal: (string | RegExp)[];
|
|
959
|
-
fallbackCJS: boolean;
|
|
960
|
-
interpretDefault: boolean;
|
|
961
961
|
coverage: ResolvedC8Options;
|
|
962
962
|
snapshotOptions: SnapshotStateOptions;
|
|
963
963
|
api?: ApiConfig;
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
export { d as describe, i as it, c as suite, t as test, e as vi, v as vitest } from './vi-
|
|
2
|
-
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, e as expect } from './index-
|
|
1
|
+
export { d as describe, i as it, c as suite, t as test, e as vi, v as vitest } from './vi-8e5d0623.js';
|
|
2
|
+
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, e as expect } from './index-4a8eca63.js';
|
|
3
3
|
export { f as fn, i as isMockFunction, s as spies, a as spyOn } from './jest-mock-6c629944.js';
|
|
4
4
|
export { assert, default as chai, should } from 'chai';
|
|
5
|
-
import './index-
|
|
6
|
-
import 'url';
|
|
5
|
+
import './index-53aca3c1.js';
|
|
7
6
|
import 'tty';
|
|
8
7
|
import 'local-pkg';
|
|
9
|
-
import 'path';
|
|
10
8
|
import './_commonjsHelpers-c9e3b764.js';
|
|
11
9
|
import 'tinyspy';
|
|
12
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OzsifQ==
|
package/dist/node.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommonServerOptions, ViteDevServer, UserConfig as UserConfig$1, Plugin as Plugin$1 } from 'vite';
|
|
2
|
+
import { ViteNodeServer } from 'vite-node/server';
|
|
2
3
|
|
|
3
4
|
interface StartOfSourceMap {
|
|
4
5
|
file?: string;
|
|
@@ -553,6 +554,10 @@ interface InlineConfig {
|
|
|
553
554
|
* Path to setup files
|
|
554
555
|
*/
|
|
555
556
|
setupFiles?: string | string[];
|
|
557
|
+
/**
|
|
558
|
+
* Path to global setup files
|
|
559
|
+
*/
|
|
560
|
+
globalSetup?: string | string[];
|
|
556
561
|
/**
|
|
557
562
|
* Pattern of file paths to be ignore from triggering watch rerun
|
|
558
563
|
*
|
|
@@ -662,10 +667,6 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters'
|
|
|
662
667
|
filters?: string[];
|
|
663
668
|
testNamePattern?: RegExp;
|
|
664
669
|
related?: string[];
|
|
665
|
-
depsInline: (string | RegExp)[];
|
|
666
|
-
depsExternal: (string | RegExp)[];
|
|
667
|
-
fallbackCJS: boolean;
|
|
668
|
-
interpretDefault: boolean;
|
|
669
670
|
coverage: ResolvedC8Options;
|
|
670
671
|
snapshotOptions: SnapshotStateOptions;
|
|
671
672
|
api?: ApiConfig;
|
|
@@ -710,12 +711,12 @@ declare class Vitest {
|
|
|
710
711
|
errorStream: NodeJS.WriteStream & {
|
|
711
712
|
fd: 2;
|
|
712
713
|
};
|
|
714
|
+
vitenode: ViteNodeServer;
|
|
713
715
|
invalidates: Set<string>;
|
|
714
716
|
changedTests: Set<string>;
|
|
715
717
|
visitedFilesMap: Map<string, RawSourceMap>;
|
|
716
718
|
runningPromise?: Promise<void>;
|
|
717
719
|
closingPromise?: Promise<void>;
|
|
718
|
-
externalizeCache: Map<string, Promise<string | false>>;
|
|
719
720
|
isFirstRun: boolean;
|
|
720
721
|
restartsCount: number;
|
|
721
722
|
private _onRestartListeners;
|
|
@@ -736,7 +737,6 @@ declare class Vitest {
|
|
|
736
737
|
report<T extends keyof Reporter>(name: T, ...args: ArgumentsType<Reporter[T]>): Promise<void>;
|
|
737
738
|
globTestFiles(filters?: string[]): Promise<string[]>;
|
|
738
739
|
isTargetFile(id: string): boolean;
|
|
739
|
-
shouldExternalize(id: string): Promise<string | false>;
|
|
740
740
|
onServerRestarted(fn: () => void): void;
|
|
741
741
|
}
|
|
742
742
|
|
package/dist/node.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export { V as VitestPlugin, c as createVitest } from './index-
|
|
1
|
+
export { V as VitestPlugin, c as createVitest } from './index-3faf3d6e.js';
|
|
2
2
|
import 'fs';
|
|
3
|
-
import './index-
|
|
4
|
-
import 'url';
|
|
5
|
-
import 'tty';
|
|
6
|
-
import 'local-pkg';
|
|
3
|
+
import './index-1b2eb03b.js';
|
|
7
4
|
import 'path';
|
|
8
5
|
import 'vite';
|
|
9
6
|
import 'process';
|
|
@@ -11,15 +8,19 @@ import 'os';
|
|
|
11
8
|
import 'util';
|
|
12
9
|
import 'stream';
|
|
13
10
|
import 'events';
|
|
14
|
-
import './
|
|
11
|
+
import './index-53aca3c1.js';
|
|
12
|
+
import 'tty';
|
|
13
|
+
import 'local-pkg';
|
|
14
|
+
import './index-c037b40c.js';
|
|
15
|
+
import 'module';
|
|
16
|
+
import 'url';
|
|
17
|
+
import 'assert';
|
|
18
|
+
import './constants-124522a1.js';
|
|
15
19
|
import './magic-string.es-94000aea.js';
|
|
16
20
|
import 'perf_hooks';
|
|
17
|
-
import './diff-
|
|
21
|
+
import './diff-deb11fa7.js';
|
|
18
22
|
import './index-648e7ab2.js';
|
|
19
23
|
import './_commonjsHelpers-c9e3b764.js';
|
|
20
|
-
import 'assert';
|
|
21
|
-
import 'module';
|
|
22
|
-
import './index-8cb72062.js';
|
|
23
24
|
import 'worker_threads';
|
|
24
25
|
import 'tinypool';
|
|
25
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
26
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|