vitest 0.20.2 → 0.21.1
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 +29 -0
- package/dist/browser.d.ts +9 -1887
- package/dist/browser.mjs +7 -7
- package/dist/{chunk-api-setup.7c4c8879.mjs → chunk-api-setup.7a6ba7fb.mjs} +5 -5
- package/dist/{chunk-constants.16825f0c.mjs → chunk-constants.26dc9f85.mjs} +1 -1
- package/dist/{chunk-defaults.1c51d585.mjs → chunk-defaults.02abff90.mjs} +2 -2
- package/dist/{chunk-integrations-globals.56a11010.mjs → chunk-integrations-globals.44a8f047.mjs} +6 -6
- package/dist/{chunk-mock-date.9160e13b.mjs → chunk-mock-date.bc81a3ac.mjs} +11 -8
- package/dist/{chunk-node-git.43dbdd42.mjs → chunk-node-git.c2be9c49.mjs} +1 -1
- package/dist/{chunk-runtime-chain.b6c2cdbc.mjs → chunk-runtime-chain.98d42d89.mjs} +30 -21
- package/dist/{chunk-runtime-error.0aa0dc06.mjs → chunk-runtime-error.87a2b5a2.mjs} +12 -11
- package/dist/{chunk-runtime-hooks.3ee34848.mjs → chunk-runtime-hooks.453f8858.mjs} +4 -4
- package/dist/{chunk-runtime-mocker.0a8f7c5e.mjs → chunk-runtime-mocker.23b62bfa.mjs} +34 -12
- package/dist/{chunk-runtime-rpc.dbf0b31d.mjs → chunk-runtime-rpc.b50ab560.mjs} +1 -1
- package/dist/{chunk-utils-source-map.8198ebd9.mjs → chunk-utils-source-map.94107ee8.mjs} +1 -1
- package/dist/{chunk-vite-node-client.a247c2c2.mjs → chunk-vite-node-client.fdd9592c.mjs} +7 -3
- package/dist/{chunk-vite-node-debug.c5887932.mjs → chunk-vite-node-debug.09afb76f.mjs} +1 -1
- package/dist/{chunk-vite-node-externalize.45323563.mjs → chunk-vite-node-externalize.27aee038.mjs} +34 -18
- package/dist/chunk-vite-node-utils.f34df9d3.mjs +6887 -0
- package/dist/cli.mjs +8 -8
- package/dist/config.d.ts +2 -67
- package/dist/entry.mjs +7 -7
- package/dist/global-60f880c6.d.ts +1779 -0
- package/dist/index-4a906fa4.d.ts +164 -0
- package/dist/index.d.ts +29 -1903
- package/dist/index.mjs +5 -5
- package/dist/loader.mjs +73 -17
- package/dist/mocker-5e2a8e41.d.ts +3 -0
- package/dist/node.d.ts +7 -1667
- package/dist/node.mjs +9 -9
- package/dist/suite.mjs +4 -4
- package/dist/{vendor-index.de788b6a.mjs → vendor-index.ae96af6e.mjs} +14 -14
- package/dist/worker.mjs +6 -6
- package/package.json +11 -11
- package/dist/chunk-vite-node-utils.9dfd1e3f.mjs +0 -1114
package/dist/cli.mjs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
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.bc81a3ac.mjs';
|
|
3
|
+
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.27aee038.mjs';
|
|
4
4
|
import 'path';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
|
7
|
-
import './chunk-defaults.
|
|
7
|
+
import './chunk-defaults.02abff90.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.26dc9f85.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.fdd9592c.mjs';
|
|
19
19
|
import 'vm';
|
|
20
|
-
import './chunk-vite-node-utils.
|
|
20
|
+
import './chunk-vite-node-utils.f34df9d3.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.94107ee8.mjs';
|
|
27
27
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
28
28
|
import 'crypto';
|
|
29
29
|
import './vendor-index.61438b77.mjs';
|
|
30
30
|
import './chunk-magic-string.efe26975.mjs';
|
|
31
31
|
import 'readline';
|
|
32
|
-
import './vendor-index.
|
|
32
|
+
import './vendor-index.ae96af6e.mjs';
|
|
33
33
|
|
|
34
34
|
function toArr(any) {
|
|
35
35
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
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-60f880c6.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.bc81a3ac.mjs';
|
|
3
|
+
import { f as envs } from './chunk-defaults.02abff90.mjs';
|
|
4
|
+
import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-error.87a2b5a2.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.453f8858.mjs';
|
|
12
|
+
import './chunk-runtime-chain.98d42d89.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.b50ab560.mjs';
|
|
17
17
|
import './chunk-utils-timers.b48455ed.mjs';
|
|
18
|
-
import './chunk-utils-source-map.
|
|
18
|
+
import './chunk-utils-source-map.94107ee8.mjs';
|
|
19
19
|
import './spy.mjs';
|
|
20
20
|
import 'tinyspy';
|
|
21
21
|
|