vitest 0.20.3 → 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.
Files changed (32) hide show
  1. package/dist/browser.d.ts +9 -1902
  2. package/dist/browser.mjs +7 -7
  3. package/dist/{chunk-api-setup.9bff74bb.mjs → chunk-api-setup.89eb0e7a.mjs} +5 -5
  4. package/dist/{chunk-constants.16825f0c.mjs → chunk-constants.9da1ef26.mjs} +1 -1
  5. package/dist/{chunk-defaults.6698a2d3.mjs → chunk-defaults.8390340d.mjs} +1 -1
  6. package/dist/{chunk-integrations-globals.c5b78414.mjs → chunk-integrations-globals.a798d352.mjs} +6 -6
  7. package/dist/{chunk-mock-date.9160e13b.mjs → chunk-mock-date.ea3b3121.mjs} +10 -7
  8. package/dist/{chunk-node-git.43dbdd42.mjs → chunk-node-git.e0dc0a7e.mjs} +1 -1
  9. package/dist/{chunk-runtime-chain.b6c2cdbc.mjs → chunk-runtime-chain.44b4224d.mjs} +30 -21
  10. package/dist/{chunk-runtime-error.034e03ba.mjs → chunk-runtime-error.95e53764.mjs} +12 -11
  11. package/dist/{chunk-runtime-hooks.a8401528.mjs → chunk-runtime-hooks.291644ec.mjs} +3 -3
  12. package/dist/{chunk-runtime-mocker.653847b2.mjs → chunk-runtime-mocker.6190d6a3.mjs} +19 -11
  13. package/dist/{chunk-runtime-rpc.dbf0b31d.mjs → chunk-runtime-rpc.fc50dcc0.mjs} +1 -1
  14. package/dist/{chunk-utils-source-map.8198ebd9.mjs → chunk-utils-source-map.d307e4ea.mjs} +1 -1
  15. package/dist/{chunk-vite-node-client.115caed2.mjs → chunk-vite-node-client.b59ba135.mjs} +2 -2
  16. package/dist/{chunk-vite-node-debug.c5887932.mjs → chunk-vite-node-debug.dbce2e1f.mjs} +1 -1
  17. package/dist/{chunk-vite-node-externalize.91ae6e85.mjs → chunk-vite-node-externalize.80bed9b3.mjs} +23 -13
  18. package/dist/{chunk-vite-node-utils.7e46948f.mjs → chunk-vite-node-utils.96438e82.mjs} +2 -2
  19. package/dist/cli.mjs +7 -7
  20. package/dist/config.d.ts +2 -67
  21. package/dist/entry.mjs +7 -7
  22. package/dist/global-644546f7.d.ts +1777 -0
  23. package/dist/index-3f764034.d.ts +164 -0
  24. package/dist/index.d.ts +10 -1928
  25. package/dist/index.mjs +5 -5
  26. package/dist/loader.mjs +72 -16
  27. package/dist/mocker-5e2a8e41.d.ts +3 -0
  28. package/dist/node.d.ts +7 -1682
  29. package/dist/node.mjs +8 -8
  30. package/dist/suite.mjs +4 -4
  31. package/dist/worker.mjs +6 -6
  32. package/package.json +3 -3
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 { UserConfig as UserConfig$1, ResolvedC8Options } from 'vitest';
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.9160e13b.mjs';
3
- import { f as envs } from './chunk-defaults.6698a2d3.mjs';
4
- import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-error.034e03ba.mjs';
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.a8401528.mjs';
12
- import './chunk-runtime-chain.b6c2cdbc.mjs';
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.dbf0b31d.mjs';
16
+ import './chunk-runtime-rpc.fc50dcc0.mjs';
17
17
  import './chunk-utils-timers.b48455ed.mjs';
18
- import './chunk-utils-source-map.8198ebd9.mjs';
18
+ import './chunk-utils-source-map.d307e4ea.mjs';
19
19
  import './spy.mjs';
20
20
  import 'tinyspy';
21
21