vitest 0.25.7 → 0.26.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/LICENSE.md +29 -171
- package/dist/browser.d.ts +6 -3
- package/dist/browser.js +9 -10
- package/dist/{chunk-api-setup.5669c9a4.js → chunk-api-setup.08f3b356.js} +39 -42
- package/dist/{chunk-integrations-globals.57158eb5.js → chunk-integrations-globals.cab94a09.js} +5 -5
- package/dist/{chunk-magic-string.ffe2b171.js → chunk-magic-string.3a794426.js} +75 -39
- package/dist/{chunk-runtime-chain.dd978482.js → chunk-runtime-chain.e655f6cc.js} +5 -6
- package/dist/{chunk-runtime-error.616e92ca.js → chunk-runtime-error.dfbbf9be.js} +5 -5
- package/dist/{chunk-runtime-mocker.bf08ae09.js → chunk-runtime-mocker.35fabb8b.js} +65 -64
- package/dist/{chunk-runtime-rpc.42aebbb9.js → chunk-runtime-rpc.7959fc79.js} +1 -1
- package/dist/{chunk-runtime-setup.bd2deed4.js → chunk-runtime-setup.4c1b529e.js} +16 -29
- package/dist/{chunk-vite-node-externalize.5a3e0bdc.js → chunk-snapshot-manager.7d978f79.js} +41 -326
- package/dist/{chunk-typecheck-constants.ed987901.js → chunk-typecheck-constants.3f865d14.js} +5 -4
- package/dist/{chunk-runtime-test-state.0037e2e0.js → chunk-utils-import.ca62c9d7.js} +49 -18
- package/dist/{chunk-utils-source-map.29ff1088.js → chunk-utils-source-map.5bbb50cd.js} +6 -4
- package/dist/cli.js +13 -14
- package/dist/config.cjs +1 -1
- package/dist/config.d.ts +6 -3
- package/dist/config.js +1 -1
- package/dist/entry.js +9 -9
- package/dist/environments.d.ts +4 -1
- package/dist/{index-fde81ec3.d.ts → index-c3f83a58.d.ts} +20 -20
- package/dist/index.d.ts +28 -10
- package/dist/index.js +6 -6
- package/dist/loader.js +7 -6
- package/dist/node.d.ts +19 -19
- package/dist/node.js +15 -15
- package/dist/suite.js +4 -4
- package/dist/{types-c441ef31.d.ts → types-56bcd6c3.d.ts} +71 -328
- package/dist/vendor-index.783e7f3e.js +71 -0
- package/dist/vendor-index.96e022fd.js +211 -0
- package/dist/worker.js +12 -14
- package/package.json +15 -15
- package/dist/chunk-vite-node-source-map.2b1f492a.js +0 -445
- package/dist/chunk-vite-node-utils.0e4a6a88.js +0 -1385
- package/dist/vendor-source-map-support.1ce17397.js +0 -707
package/LICENSE.md
CHANGED
|
@@ -58,6 +58,35 @@ Repository: git+https://github.com/antfu/install-pkg.git
|
|
|
58
58
|
|
|
59
59
|
---------------------------------------
|
|
60
60
|
|
|
61
|
+
## @jridgewell/sourcemap-codec
|
|
62
|
+
License: MIT
|
|
63
|
+
By: Rich Harris
|
|
64
|
+
Repository: git+https://github.com/jridgewell/sourcemap-codec.git
|
|
65
|
+
|
|
66
|
+
> The MIT License
|
|
67
|
+
>
|
|
68
|
+
> Copyright (c) 2015 Rich Harris
|
|
69
|
+
>
|
|
70
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
71
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
72
|
+
> in the Software without restriction, including without limitation the rights
|
|
73
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
74
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
75
|
+
> furnished to do so, subject to the following conditions:
|
|
76
|
+
>
|
|
77
|
+
> The above copyright notice and this permission notice shall be included in
|
|
78
|
+
> all copies or substantial portions of the Software.
|
|
79
|
+
>
|
|
80
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
81
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
82
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
83
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
84
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
85
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
86
|
+
> THE SOFTWARE.
|
|
87
|
+
|
|
88
|
+
---------------------------------------
|
|
89
|
+
|
|
61
90
|
## @nodelib/fs.scandir
|
|
62
91
|
License: MIT
|
|
63
92
|
Repository: https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir
|
|
@@ -306,34 +335,6 @@ Repository: micromatch/braces
|
|
|
306
335
|
|
|
307
336
|
---------------------------------------
|
|
308
337
|
|
|
309
|
-
## buffer-from
|
|
310
|
-
License: MIT
|
|
311
|
-
Repository: LinusU/buffer-from
|
|
312
|
-
|
|
313
|
-
> MIT License
|
|
314
|
-
>
|
|
315
|
-
> Copyright (c) 2016, 2018 Linus Unnebäck
|
|
316
|
-
>
|
|
317
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
318
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
319
|
-
> in the Software without restriction, including without limitation the rights
|
|
320
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
321
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
322
|
-
> furnished to do so, subject to the following conditions:
|
|
323
|
-
>
|
|
324
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
325
|
-
> copies or substantial portions of the Software.
|
|
326
|
-
>
|
|
327
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
328
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
329
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
330
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
331
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
332
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
333
|
-
> SOFTWARE.
|
|
334
|
-
|
|
335
|
-
---------------------------------------
|
|
336
|
-
|
|
337
338
|
## cac
|
|
338
339
|
License: MIT
|
|
339
340
|
By: egoist
|
|
@@ -1744,57 +1745,6 @@ Repository: micromatch/picomatch
|
|
|
1744
1745
|
|
|
1745
1746
|
---------------------------------------
|
|
1746
1747
|
|
|
1747
|
-
## pkg-types
|
|
1748
|
-
License: MIT
|
|
1749
|
-
Repository: unjs/pkg-types
|
|
1750
|
-
|
|
1751
|
-
> MIT License
|
|
1752
|
-
>
|
|
1753
|
-
> Copyright (c) Pooya Parsa <pooya@pi0.io>
|
|
1754
|
-
>
|
|
1755
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1756
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
1757
|
-
> in the Software without restriction, including without limitation the rights
|
|
1758
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1759
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
1760
|
-
> furnished to do so, subject to the following conditions:
|
|
1761
|
-
>
|
|
1762
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
1763
|
-
> copies or substantial portions of the Software.
|
|
1764
|
-
>
|
|
1765
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1766
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1767
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1768
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1769
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1770
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1771
|
-
> SOFTWARE.
|
|
1772
|
-
>
|
|
1773
|
-
> --------------------------------------------------------------------------------
|
|
1774
|
-
>
|
|
1775
|
-
> Copyright Joyent, Inc. and other Node contributors.
|
|
1776
|
-
>
|
|
1777
|
-
> Permission is hereby granted, free of charge, to any person obtaining a
|
|
1778
|
-
> copy of this software and associated documentation files (the
|
|
1779
|
-
> "Software"), to deal in the Software without restriction, including
|
|
1780
|
-
> without limitation the rights to use, copy, modify, merge, publish,
|
|
1781
|
-
> distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
1782
|
-
> persons to whom the Software is furnished to do so, subject to the
|
|
1783
|
-
> following conditions:
|
|
1784
|
-
>
|
|
1785
|
-
> The above copyright notice and this permission notice shall be included
|
|
1786
|
-
> in all copies or substantial portions of the Software.
|
|
1787
|
-
>
|
|
1788
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
1789
|
-
> OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
1790
|
-
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
1791
|
-
> NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
1792
|
-
> DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
1793
|
-
> OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
1794
|
-
> USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1795
|
-
|
|
1796
|
-
---------------------------------------
|
|
1797
|
-
|
|
1798
1748
|
## pretty-format
|
|
1799
1749
|
License: MIT
|
|
1800
1750
|
By: James Kyle
|
|
@@ -2087,63 +2037,6 @@ Repository: chalk/slice-ansi
|
|
|
2087
2037
|
|
|
2088
2038
|
---------------------------------------
|
|
2089
2039
|
|
|
2090
|
-
## source-map-support
|
|
2091
|
-
License: MIT
|
|
2092
|
-
Repository: https://github.com/evanw/node-source-map-support
|
|
2093
|
-
|
|
2094
|
-
> The MIT License (MIT)
|
|
2095
|
-
>
|
|
2096
|
-
> Copyright (c) 2014 Evan Wallace
|
|
2097
|
-
>
|
|
2098
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2099
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
2100
|
-
> in the Software without restriction, including without limitation the rights
|
|
2101
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2102
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
2103
|
-
> furnished to do so, subject to the following conditions:
|
|
2104
|
-
>
|
|
2105
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
2106
|
-
> copies or substantial portions of the Software.
|
|
2107
|
-
>
|
|
2108
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2109
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2110
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2111
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2112
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2113
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2114
|
-
> SOFTWARE.
|
|
2115
|
-
|
|
2116
|
-
---------------------------------------
|
|
2117
|
-
|
|
2118
|
-
## sourcemap-codec
|
|
2119
|
-
License: MIT
|
|
2120
|
-
By: Rich Harris
|
|
2121
|
-
Repository: https://github.com/Rich-Harris/sourcemap-codec
|
|
2122
|
-
|
|
2123
|
-
> The MIT License
|
|
2124
|
-
>
|
|
2125
|
-
> Copyright (c) 2015 Rich Harris
|
|
2126
|
-
>
|
|
2127
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2128
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
2129
|
-
> in the Software without restriction, including without limitation the rights
|
|
2130
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2131
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
2132
|
-
> furnished to do so, subject to the following conditions:
|
|
2133
|
-
>
|
|
2134
|
-
> The above copyright notice and this permission notice shall be included in
|
|
2135
|
-
> all copies or substantial portions of the Software.
|
|
2136
|
-
>
|
|
2137
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2138
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2139
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2140
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2141
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2142
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2143
|
-
> THE SOFTWARE.
|
|
2144
|
-
|
|
2145
|
-
---------------------------------------
|
|
2146
|
-
|
|
2147
2040
|
## string-width
|
|
2148
2041
|
License: MIT
|
|
2149
2042
|
By: Sindre Sorhus
|
|
@@ -2251,41 +2144,6 @@ Repository: git+ssh://git@github.com/chaijs/type-detect.git
|
|
|
2251
2144
|
|
|
2252
2145
|
---------------------------------------
|
|
2253
2146
|
|
|
2254
|
-
## ufo
|
|
2255
|
-
License: MIT
|
|
2256
|
-
Repository: unjs/ufo
|
|
2257
|
-
|
|
2258
|
-
> MIT License
|
|
2259
|
-
>
|
|
2260
|
-
> Copyright (c) Pooya Parsa <pooya@pi0.io>
|
|
2261
|
-
>
|
|
2262
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2263
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
2264
|
-
> in the Software without restriction, including without limitation the rights
|
|
2265
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2266
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
2267
|
-
> furnished to do so, subject to the following conditions:
|
|
2268
|
-
>
|
|
2269
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
2270
|
-
> copies or substantial portions of the Software.
|
|
2271
|
-
>
|
|
2272
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2273
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2274
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2275
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2276
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2277
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2278
|
-
> SOFTWARE.
|
|
2279
|
-
|
|
2280
|
-
---------------------------------------
|
|
2281
|
-
|
|
2282
|
-
## vite-node
|
|
2283
|
-
License: MIT
|
|
2284
|
-
By: Anthony Fu
|
|
2285
|
-
Repository: git+https://github.com/vitest-dev/vitest.git
|
|
2286
|
-
|
|
2287
|
-
---------------------------------------
|
|
2288
|
-
|
|
2289
2147
|
## which
|
|
2290
2148
|
License: ISC
|
|
2291
2149
|
By: Isaac Z. Schlueter
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
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, 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-
|
|
2
|
-
import { b as ResolvedConfig } from './types-
|
|
3
|
-
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
|
+
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, 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-c3f83a58.js';
|
|
2
|
+
import { b as ResolvedConfig } from './types-56bcd6c3.js';
|
|
3
|
+
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-56bcd6c3.js';
|
|
4
4
|
import * as chai from 'chai';
|
|
5
5
|
export { chai };
|
|
6
6
|
export { assert, should } from 'chai';
|
|
7
7
|
export { Bench as BenchFactory, Options as BenchOptions, Task as BenchTask, TaskResult as BenchTaskResult } from 'tinybench';
|
|
8
8
|
import 'tinyspy';
|
|
9
9
|
import 'vite';
|
|
10
|
+
import 'vite-node/client';
|
|
11
|
+
import 'vite-node/server';
|
|
12
|
+
import 'vite-node';
|
|
10
13
|
import 'fs';
|
|
11
14
|
import 'worker_threads';
|
|
12
15
|
|
package/dist/browser.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
export { 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-
|
|
3
|
-
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, o as onTestFailed } from './chunk-
|
|
4
|
-
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-setup.
|
|
1
|
+
export { c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.e655f6cc.js';
|
|
2
|
+
import { e as dist } from './chunk-utils-import.ca62c9d7.js';
|
|
3
|
+
export { a as afterAll, d as afterEach, f as assertType, b as beforeAll, c as beforeEach, o as onTestFailed } from './chunk-utils-import.ca62c9d7.js';
|
|
4
|
+
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-setup.4c1b529e.js';
|
|
5
5
|
import * as chai from 'chai';
|
|
6
6
|
export { chai };
|
|
7
7
|
export { assert, should } from 'chai';
|
|
8
8
|
import 'util';
|
|
9
|
-
import './chunk-typecheck-constants.
|
|
9
|
+
import './chunk-typecheck-constants.3f865d14.js';
|
|
10
10
|
import 'path';
|
|
11
11
|
import './chunk-utils-env.03f840f2.js';
|
|
12
12
|
import 'tty';
|
|
13
13
|
import 'url';
|
|
14
14
|
import 'local-pkg';
|
|
15
15
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
16
|
-
import './chunk-runtime-rpc.
|
|
16
|
+
import './chunk-runtime-rpc.7959fc79.js';
|
|
17
17
|
import './chunk-utils-timers.793fd179.js';
|
|
18
18
|
import 'fs';
|
|
19
|
-
import './chunk-utils-source-map.
|
|
19
|
+
import './chunk-utils-source-map.5bbb50cd.js';
|
|
20
20
|
import './spy.js';
|
|
21
21
|
import 'tinyspy';
|
|
22
22
|
import 'perf_hooks';
|
|
23
23
|
import './chunk-integrations-coverage.befed097.js';
|
|
24
|
-
import './chunk-runtime-error.
|
|
25
|
-
import '
|
|
26
|
-
import 'source-map';
|
|
24
|
+
import './chunk-runtime-error.dfbbf9be.js';
|
|
25
|
+
import 'vite-node/source-map';
|
|
27
26
|
import './chunk-env-node.67948209.js';
|
|
28
27
|
import 'console';
|
|
29
28
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import { c as createBirpc } from './
|
|
2
|
+
import { c as createBirpc } from './vendor-index.783e7f3e.js';
|
|
3
3
|
import require$$0$1 from 'stream';
|
|
4
4
|
import require$$0 from 'zlib';
|
|
5
5
|
import require$$3 from 'net';
|
|
@@ -10,17 +10,44 @@ import require$$1 from 'https';
|
|
|
10
10
|
import require$$2$1 from 'http';
|
|
11
11
|
import url from 'url';
|
|
12
12
|
import { A as API_PATH } from './chunk-utils-env.03f840f2.js';
|
|
13
|
-
import '
|
|
14
|
-
import 'vm';
|
|
15
|
-
import './chunk-vite-node-utils.0e4a6a88.js';
|
|
16
|
-
import 'acorn';
|
|
17
|
-
import 'path';
|
|
18
|
-
import 'assert';
|
|
19
|
-
import 'util';
|
|
20
|
-
import 'debug';
|
|
21
|
-
import './vendor-source-map-support.1ce17397.js';
|
|
22
|
-
import 'source-map';
|
|
13
|
+
import './chunk-typecheck-constants.3f865d14.js';
|
|
23
14
|
import 'tty';
|
|
15
|
+
import 'path';
|
|
16
|
+
import 'local-pkg';
|
|
17
|
+
|
|
18
|
+
async function getModuleGraph(ctx, id) {
|
|
19
|
+
const graph = {};
|
|
20
|
+
const externalized = /* @__PURE__ */ new Set();
|
|
21
|
+
const inlined = /* @__PURE__ */ new Set();
|
|
22
|
+
function clearId(id2) {
|
|
23
|
+
return (id2 == null ? void 0 : id2.replace(/\?v=\w+$/, "")) || "";
|
|
24
|
+
}
|
|
25
|
+
async function get(mod, seen = /* @__PURE__ */ new Map()) {
|
|
26
|
+
if (!mod || !mod.id)
|
|
27
|
+
return;
|
|
28
|
+
if (seen.has(mod))
|
|
29
|
+
return seen.get(mod);
|
|
30
|
+
let id2 = clearId(mod.id);
|
|
31
|
+
seen.set(mod, id2);
|
|
32
|
+
const rewrote = await ctx.vitenode.shouldExternalize(id2);
|
|
33
|
+
if (rewrote) {
|
|
34
|
+
id2 = rewrote;
|
|
35
|
+
externalized.add(id2);
|
|
36
|
+
seen.set(mod, id2);
|
|
37
|
+
} else {
|
|
38
|
+
inlined.add(id2);
|
|
39
|
+
}
|
|
40
|
+
const mods = Array.from(mod.importedModules).filter((i) => i.id && !i.id.includes("/vitest/dist/"));
|
|
41
|
+
graph[id2] = (await Promise.all(mods.map((m) => get(m, seen)))).filter(Boolean);
|
|
42
|
+
return id2;
|
|
43
|
+
}
|
|
44
|
+
await get(ctx.server.moduleGraph.getModuleById(id));
|
|
45
|
+
return {
|
|
46
|
+
graph,
|
|
47
|
+
externalized: Array.from(externalized),
|
|
48
|
+
inlined: Array.from(inlined)
|
|
49
|
+
};
|
|
50
|
+
}
|
|
24
51
|
|
|
25
52
|
/*! (c) 2020 Andrea Giammarchi */
|
|
26
53
|
|
|
@@ -4488,37 +4515,7 @@ function setup(ctx) {
|
|
|
4488
4515
|
}
|
|
4489
4516
|
},
|
|
4490
4517
|
async getModuleGraph(id) {
|
|
4491
|
-
|
|
4492
|
-
const externalized = /* @__PURE__ */ new Set();
|
|
4493
|
-
const inlined = /* @__PURE__ */ new Set();
|
|
4494
|
-
function clearId(id2) {
|
|
4495
|
-
return (id2 == null ? void 0 : id2.replace(/\?v=\w+$/, "")) || "";
|
|
4496
|
-
}
|
|
4497
|
-
async function get(mod, seen = /* @__PURE__ */ new Map()) {
|
|
4498
|
-
if (!mod || !mod.id)
|
|
4499
|
-
return;
|
|
4500
|
-
if (seen.has(mod))
|
|
4501
|
-
return seen.get(mod);
|
|
4502
|
-
let id2 = clearId(mod.id);
|
|
4503
|
-
seen.set(mod, id2);
|
|
4504
|
-
const rewrote = await ctx.vitenode.shouldExternalize(id2);
|
|
4505
|
-
if (rewrote) {
|
|
4506
|
-
id2 = rewrote;
|
|
4507
|
-
externalized.add(id2);
|
|
4508
|
-
seen.set(mod, id2);
|
|
4509
|
-
} else {
|
|
4510
|
-
inlined.add(id2);
|
|
4511
|
-
}
|
|
4512
|
-
const mods = Array.from(mod.importedModules).filter((i) => i.id && !i.id.includes("/vitest/dist/"));
|
|
4513
|
-
graph[id2] = (await Promise.all(mods.map((m) => get(m, seen)))).filter(Boolean);
|
|
4514
|
-
return id2;
|
|
4515
|
-
}
|
|
4516
|
-
await get(ctx.server.moduleGraph.getModuleById(id));
|
|
4517
|
-
return {
|
|
4518
|
-
graph,
|
|
4519
|
-
externalized: Array.from(externalized),
|
|
4520
|
-
inlined: Array.from(inlined)
|
|
4521
|
-
};
|
|
4518
|
+
return getModuleGraph(ctx, id);
|
|
4522
4519
|
},
|
|
4523
4520
|
updateSnapshot(file) {
|
|
4524
4521
|
if (!file)
|
package/dist/{chunk-integrations-globals.57158eb5.js → chunk-integrations-globals.cab94a09.js}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { m as globalApis } from './chunk-utils-env.03f840f2.js';
|
|
2
|
-
import { i as index } from './chunk-
|
|
2
|
+
import { i as index } from './chunk-utils-import.ca62c9d7.js';
|
|
3
3
|
import 'tty';
|
|
4
4
|
import 'url';
|
|
5
5
|
import 'path';
|
|
6
|
-
import './chunk-runtime-chain.
|
|
6
|
+
import './chunk-runtime-chain.e655f6cc.js';
|
|
7
7
|
import 'util';
|
|
8
8
|
import 'chai';
|
|
9
|
-
import './chunk-typecheck-constants.
|
|
9
|
+
import './chunk-typecheck-constants.3f865d14.js';
|
|
10
10
|
import 'local-pkg';
|
|
11
11
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
12
|
-
import './chunk-runtime-rpc.
|
|
12
|
+
import './chunk-runtime-rpc.7959fc79.js';
|
|
13
13
|
import './chunk-utils-timers.793fd179.js';
|
|
14
14
|
import 'fs';
|
|
15
|
-
import './chunk-utils-source-map.
|
|
15
|
+
import './chunk-utils-source-map.5bbb50cd.js';
|
|
16
16
|
import './spy.js';
|
|
17
17
|
import 'tinyspy';
|
|
18
18
|
|
|
@@ -1,53 +1,89 @@
|
|
|
1
|
-
|
|
1
|
+
const comma = ','.charCodeAt(0);
|
|
2
|
+
const semicolon = ';'.charCodeAt(0);
|
|
3
|
+
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
4
|
+
const intToChar = new Uint8Array(64); // 64 possible chars.
|
|
5
|
+
const charToInt = new Uint8Array(128); // z is 122 in ASCII
|
|
6
|
+
for (let i = 0; i < chars.length; i++) {
|
|
7
|
+
const c = chars.charCodeAt(i);
|
|
8
|
+
intToChar[i] = c;
|
|
9
|
+
charToInt[c] = i;
|
|
10
|
+
}
|
|
11
|
+
// Provide a fallback for older environments.
|
|
12
|
+
const td = typeof TextDecoder !== 'undefined'
|
|
13
|
+
? /* #__PURE__ */ new TextDecoder()
|
|
14
|
+
: typeof Buffer !== 'undefined'
|
|
15
|
+
? {
|
|
16
|
+
decode(buf) {
|
|
17
|
+
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
18
|
+
return out.toString();
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
: {
|
|
22
|
+
decode(buf) {
|
|
23
|
+
let out = '';
|
|
24
|
+
for (let i = 0; i < buf.length; i++) {
|
|
25
|
+
out += String.fromCharCode(buf[i]);
|
|
26
|
+
}
|
|
27
|
+
return out;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
2
30
|
function encode(decoded) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
31
|
+
const state = new Int32Array(5);
|
|
32
|
+
const bufLength = 1024 * 16;
|
|
33
|
+
const subLength = bufLength - 36;
|
|
34
|
+
const buf = new Uint8Array(bufLength);
|
|
35
|
+
const sub = buf.subarray(0, subLength);
|
|
36
|
+
let pos = 0;
|
|
37
|
+
let out = '';
|
|
38
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
39
|
+
const line = decoded[i];
|
|
40
|
+
if (i > 0) {
|
|
41
|
+
if (pos === bufLength) {
|
|
42
|
+
out += td.decode(buf);
|
|
43
|
+
pos = 0;
|
|
44
|
+
}
|
|
45
|
+
buf[pos++] = semicolon;
|
|
46
|
+
}
|
|
12
47
|
if (line.length === 0)
|
|
13
48
|
continue;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
encodeInteger(segment[2] - sourceCodeLine) +
|
|
24
|
-
encodeInteger(segment[3] - sourceCodeColumn);
|
|
25
|
-
sourceFileIndex = segment[1];
|
|
26
|
-
sourceCodeLine = segment[2];
|
|
27
|
-
sourceCodeColumn = segment[3];
|
|
28
|
-
}
|
|
29
|
-
if (segment.length === 5) {
|
|
30
|
-
segmentMappings += encodeInteger(segment[4] - nameIndex);
|
|
31
|
-
nameIndex = segment[4];
|
|
49
|
+
state[0] = 0;
|
|
50
|
+
for (let j = 0; j < line.length; j++) {
|
|
51
|
+
const segment = line[j];
|
|
52
|
+
// We can push up to 5 ints, each int can take at most 7 chars, and we
|
|
53
|
+
// may push a comma.
|
|
54
|
+
if (pos > subLength) {
|
|
55
|
+
out += td.decode(sub);
|
|
56
|
+
buf.copyWithin(0, subLength, pos);
|
|
57
|
+
pos -= subLength;
|
|
32
58
|
}
|
|
33
|
-
|
|
59
|
+
if (j > 0)
|
|
60
|
+
buf[pos++] = comma;
|
|
61
|
+
pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
|
|
62
|
+
if (segment.length === 1)
|
|
63
|
+
continue;
|
|
64
|
+
pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
|
|
65
|
+
pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
|
|
66
|
+
pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
|
|
67
|
+
if (segment.length === 4)
|
|
68
|
+
continue;
|
|
69
|
+
pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
|
|
34
70
|
}
|
|
35
|
-
mappings += lineMappings.join(',');
|
|
36
71
|
}
|
|
37
|
-
return
|
|
72
|
+
return out + td.decode(buf.subarray(0, pos));
|
|
38
73
|
}
|
|
39
|
-
function encodeInteger(
|
|
40
|
-
|
|
74
|
+
function encodeInteger(buf, pos, state, segment, j) {
|
|
75
|
+
const next = segment[j];
|
|
76
|
+
let num = next - state[j];
|
|
77
|
+
state[j] = next;
|
|
41
78
|
num = num < 0 ? (-num << 1) | 1 : num << 1;
|
|
42
79
|
do {
|
|
43
|
-
|
|
80
|
+
let clamped = num & 0b011111;
|
|
44
81
|
num >>>= 5;
|
|
45
|
-
if (num > 0)
|
|
46
|
-
clamped |=
|
|
47
|
-
|
|
48
|
-
result += chars[clamped];
|
|
82
|
+
if (num > 0)
|
|
83
|
+
clamped |= 0b100000;
|
|
84
|
+
buf[pos++] = intToChar[clamped];
|
|
49
85
|
} while (num > 0);
|
|
50
|
-
return
|
|
86
|
+
return pos;
|
|
51
87
|
}
|
|
52
88
|
|
|
53
89
|
class BitSet {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import util$1 from 'util';
|
|
2
2
|
import * as chai$2 from 'chai';
|
|
3
3
|
import { expect, AssertionError, util } from 'chai';
|
|
4
|
-
import { i as isObject, b as getCallLastIndex, s as slash, g as getWorkerState, c as getNames, d as assertTypes, e as getFullName, o as objectAttr, n as noop,
|
|
4
|
+
import { i as isObject, b as getCallLastIndex, s as slash, g as getWorkerState, c as getNames, d as assertTypes, e as getCurrentEnvironment, f as getFullName, o as objectAttr, n as noop, h as isRunningInTest, j as isRunningInBenchmark } from './chunk-typecheck-constants.3f865d14.js';
|
|
5
5
|
import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
|
|
6
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
6
|
+
import { r as rpc } from './chunk-runtime-rpc.7959fc79.js';
|
|
7
7
|
import fs, { promises } from 'fs';
|
|
8
8
|
import { j as join, d as dirname, p as picocolors } from './chunk-utils-env.03f840f2.js';
|
|
9
9
|
import { p as plugins_1, f as format_1, u as unifiedDiff, a as stringify, m as matcherUtils, s as safeSetTimeout, b as safeClearTimeout } from './chunk-utils-timers.793fd179.js';
|
|
10
|
-
import { a as posToNumber, n as numberToPos, l as lineSplitRE, p as parseStacktrace } from './chunk-utils-source-map.
|
|
10
|
+
import { a as posToNumber, n as numberToPos, l as lineSplitRE, p as parseStacktrace } from './chunk-utils-source-map.5bbb50cd.js';
|
|
11
11
|
import { isMockFunction } from './spy.js';
|
|
12
12
|
|
|
13
13
|
function createChainable(keys, fn) {
|
|
@@ -600,7 +600,7 @@ function deepMergeSnapshot(target, source) {
|
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
async function saveInlineSnapshots(snapshots) {
|
|
603
|
-
const MagicString = (await import('./chunk-magic-string.
|
|
603
|
+
const MagicString = (await import('./chunk-magic-string.3a794426.js')).default;
|
|
604
604
|
const files = new Set(snapshots.map((i) => i.file));
|
|
605
605
|
await Promise.all(Array.from(files).map(async (file) => {
|
|
606
606
|
const snaps = snapshots.filter((i) => i.file === file);
|
|
@@ -2077,7 +2077,6 @@ chai$2.use(Subset);
|
|
|
2077
2077
|
chai$2.use(SnapshotPlugin);
|
|
2078
2078
|
chai$2.use(JestAsymmetricMatchers);
|
|
2079
2079
|
|
|
2080
|
-
const workerState$1 = getWorkerState();
|
|
2081
2080
|
function createExpect(test) {
|
|
2082
2081
|
var _a;
|
|
2083
2082
|
const expect = (value, message) => {
|
|
@@ -2098,7 +2097,7 @@ function createExpect(test) {
|
|
|
2098
2097
|
isExpectingAssertionsError: null,
|
|
2099
2098
|
expectedAssertionsNumber: null,
|
|
2100
2099
|
expectedAssertionsNumberErrorGen: null,
|
|
2101
|
-
environment:
|
|
2100
|
+
environment: getCurrentEnvironment(),
|
|
2102
2101
|
testPath: (_a = test == null ? void 0 : test.suite.file) == null ? void 0 : _a.filepath,
|
|
2103
2102
|
currentTestName: test ? getFullName(test) : void 0
|
|
2104
2103
|
}, expect);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import util$1 from 'util';
|
|
2
2
|
import { util } from 'chai';
|
|
3
3
|
import { a as stringify } from './chunk-utils-timers.793fd179.js';
|
|
4
|
-
import {
|
|
4
|
+
import { x as deepClone, y as getType } from './chunk-typecheck-constants.3f865d14.js';
|
|
5
5
|
|
|
6
6
|
const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
7
7
|
const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
@@ -18,7 +18,7 @@ function serializeError(val, seen = /* @__PURE__ */ new WeakMap()) {
|
|
|
18
18
|
if (!val || typeof val === "string")
|
|
19
19
|
return val;
|
|
20
20
|
if (typeof val === "function")
|
|
21
|
-
return `Function<${val.name}>`;
|
|
21
|
+
return `Function<${val.name || "anonymous"}>`;
|
|
22
22
|
if (typeof val === "symbol")
|
|
23
23
|
return val.toString();
|
|
24
24
|
if (typeof val !== "object")
|
|
@@ -106,13 +106,13 @@ function isReplaceable(obj1, obj2) {
|
|
|
106
106
|
const obj2Type = getType(obj2);
|
|
107
107
|
return obj1Type === obj2Type && obj1Type === "Object";
|
|
108
108
|
}
|
|
109
|
-
function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE__ */ new
|
|
109
|
+
function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE__ */ new WeakSet(), expectedReplaced = /* @__PURE__ */ new WeakSet()) {
|
|
110
110
|
if (!isReplaceable(actual, expected))
|
|
111
111
|
return { replacedActual: actual, replacedExpected: expected };
|
|
112
112
|
if (actualReplaced.has(actual) || expectedReplaced.has(expected))
|
|
113
113
|
return { replacedActual: actual, replacedExpected: expected };
|
|
114
|
-
actualReplaced.
|
|
115
|
-
expectedReplaced.
|
|
114
|
+
actualReplaced.add(actual);
|
|
115
|
+
expectedReplaced.add(expected);
|
|
116
116
|
util.getOwnEnumerableProperties(expected).forEach((key) => {
|
|
117
117
|
const expectedValue = expected[key];
|
|
118
118
|
const actualValue = actual[key];
|