@voidzero-dev/vite-plus-test 0.0.0-0bfcc90f.20260209-0731
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 +691 -0
- package/browser/context.d.ts +4 -0
- package/browser/context.js +20 -0
- package/config.d.ts +3 -0
- package/coverage.d.ts +1 -0
- package/dist/@vitest/browser/client/.vite/manifest.json +24 -0
- package/dist/@vitest/browser/client/__vitest__/assets/index-BUCFJtth.js +57 -0
- package/dist/@vitest/browser/client/__vitest__/assets/index-DlhE0rqZ.css +1 -0
- package/dist/@vitest/browser/client/__vitest__/bg.png +0 -0
- package/dist/@vitest/browser/client/__vitest__/favicon.ico +0 -0
- package/dist/@vitest/browser/client/__vitest__/favicon.svg +5 -0
- package/dist/@vitest/browser/client/__vitest__/index.html +32 -0
- package/dist/@vitest/browser/client/__vitest_browser__/orchestrator-S_3e_uzt.js +345 -0
- package/dist/@vitest/browser/client/__vitest_browser__/tester-k74mgIRa.js +2171 -0
- package/dist/@vitest/browser/client/__vitest_browser__/utils-uxqdqUz8.js +223 -0
- package/dist/@vitest/browser/client/error-catcher.js +82 -0
- package/dist/@vitest/browser/client/esm-client-injector.js +67 -0
- package/dist/@vitest/browser/client/favicon.svg +5 -0
- package/dist/@vitest/browser/client/orchestrator.html +35 -0
- package/dist/@vitest/browser/client/tester/tester.html +13 -0
- package/dist/@vitest/browser/client.js +456 -0
- package/dist/@vitest/browser/context.d.ts +792 -0
- package/dist/@vitest/browser/context.js +541 -0
- package/dist/@vitest/browser/expect-element.js +32 -0
- package/dist/@vitest/browser/index-D6m36C6U.js +11 -0
- package/dist/@vitest/browser/index.d.ts +73 -0
- package/dist/@vitest/browser/index.js +3513 -0
- package/dist/@vitest/browser/jest-dom.d.ts +724 -0
- package/dist/@vitest/browser/locators.d.ts +354 -0
- package/dist/@vitest/browser/locators.js +1 -0
- package/dist/@vitest/browser/matchers.d.ts +29 -0
- package/dist/@vitest/browser/shared/screenshotMatcher/types.d.ts +22 -0
- package/dist/@vitest/browser/state.js +280 -0
- package/dist/@vitest/browser/types.d.ts +69 -0
- package/dist/@vitest/browser-playwright/context.d.ts +1 -0
- package/dist/@vitest/browser-playwright/index.d.ts +106 -0
- package/dist/@vitest/browser-playwright/index.js +1111 -0
- package/dist/@vitest/browser-playwright/locators.js +114 -0
- package/dist/@vitest/browser-preview/context.d.ts +1 -0
- package/dist/@vitest/browser-preview/index.d.ts +19 -0
- package/dist/@vitest/browser-preview/index.js +148 -0
- package/dist/@vitest/browser-preview/locators.js +79 -0
- package/dist/@vitest/browser-webdriverio/context.d.ts +1 -0
- package/dist/@vitest/browser-webdriverio/index.d.ts +63 -0
- package/dist/@vitest/browser-webdriverio/index.js +600 -0
- package/dist/@vitest/browser-webdriverio/locators.js +163 -0
- package/dist/@vitest/expect/index.d.ts +807 -0
- package/dist/@vitest/expect/index.js +1875 -0
- package/dist/@vitest/mocker/auto-register.d.ts +2 -0
- package/dist/@vitest/mocker/auto-register.js +9 -0
- package/dist/@vitest/mocker/automock.d.ts +12 -0
- package/dist/@vitest/mocker/automock.js +1 -0
- package/dist/@vitest/mocker/browser.d.ts +53 -0
- package/dist/@vitest/mocker/browser.js +91 -0
- package/dist/@vitest/mocker/chunk-automock.js +354 -0
- package/dist/@vitest/mocker/chunk-interceptor-native.js +15 -0
- package/dist/@vitest/mocker/chunk-mocker.js +521 -0
- package/dist/@vitest/mocker/chunk-pathe.M-eThtNZ.js +174 -0
- package/dist/@vitest/mocker/chunk-registry.js +185 -0
- package/dist/@vitest/mocker/chunk-utils.js +16 -0
- package/dist/@vitest/mocker/index.d-C-sLYZi-.d.ts +25 -0
- package/dist/@vitest/mocker/index.d.ts +2 -0
- package/dist/@vitest/mocker/index.js +185 -0
- package/dist/@vitest/mocker/mocker.d-TnKRhz7N.d.ts +81 -0
- package/dist/@vitest/mocker/node.d.ts +800 -0
- package/dist/@vitest/mocker/node.js +966 -0
- package/dist/@vitest/mocker/redirect.d.ts +3 -0
- package/dist/@vitest/mocker/redirect.js +79 -0
- package/dist/@vitest/mocker/register.d.ts +9 -0
- package/dist/@vitest/mocker/register.js +41 -0
- package/dist/@vitest/mocker/types.d-B8CCKmHt.d.ts +107 -0
- package/dist/@vitest/pretty-format/index.d.ts +124 -0
- package/dist/@vitest/pretty-format/index.js +1022 -0
- package/dist/@vitest/runner/chunk-tasks.js +340 -0
- package/dist/@vitest/runner/index.d.ts +180 -0
- package/dist/@vitest/runner/index.js +2114 -0
- package/dist/@vitest/runner/tasks.d-C7UxawJ9.d.ts +834 -0
- package/dist/@vitest/runner/types.d.ts +183 -0
- package/dist/@vitest/runner/types.js +1 -0
- package/dist/@vitest/runner/utils.d.ts +45 -0
- package/dist/@vitest/runner/utils.js +5 -0
- package/dist/@vitest/snapshot/environment.d-DHdQ1Csl.d.ts +22 -0
- package/dist/@vitest/snapshot/environment.d.ts +16 -0
- package/dist/@vitest/snapshot/environment.js +40 -0
- package/dist/@vitest/snapshot/index.d.ts +130 -0
- package/dist/@vitest/snapshot/index.js +1437 -0
- package/dist/@vitest/snapshot/manager.d.ts +18 -0
- package/dist/@vitest/snapshot/manager.js +73 -0
- package/dist/@vitest/snapshot/rawSnapshot.d-lFsMJFUd.d.ts +61 -0
- package/dist/@vitest/spy/index.d.ts +384 -0
- package/dist/@vitest/spy/index.js +433 -0
- package/dist/@vitest/utils/chunk-_commonjsHelpers.js +5 -0
- package/dist/@vitest/utils/chunk-pathe.M-eThtNZ.js +156 -0
- package/dist/@vitest/utils/constants.d.ts +21 -0
- package/dist/@vitest/utils/constants.js +49 -0
- package/dist/@vitest/utils/diff.d.ts +93 -0
- package/dist/@vitest/utils/diff.js +2199 -0
- package/dist/@vitest/utils/display.d.ts +29 -0
- package/dist/@vitest/utils/display.js +742 -0
- package/dist/@vitest/utils/error.d.ts +7 -0
- package/dist/@vitest/utils/error.js +42 -0
- package/dist/@vitest/utils/helpers.d.ts +73 -0
- package/dist/@vitest/utils/helpers.js +295 -0
- package/dist/@vitest/utils/highlight.d.ts +9 -0
- package/dist/@vitest/utils/highlight.js +538 -0
- package/dist/@vitest/utils/index.d.ts +5 -0
- package/dist/@vitest/utils/index.js +1 -0
- package/dist/@vitest/utils/offset.d.ts +5 -0
- package/dist/@vitest/utils/offset.js +32 -0
- package/dist/@vitest/utils/resolver.d.ts +7 -0
- package/dist/@vitest/utils/resolver.js +71 -0
- package/dist/@vitest/utils/serialize.d.ts +3 -0
- package/dist/@vitest/utils/serialize.js +118 -0
- package/dist/@vitest/utils/source-map.d.ts +55 -0
- package/dist/@vitest/utils/source-map.js +478 -0
- package/dist/@vitest/utils/timers.d.ts +33 -0
- package/dist/@vitest/utils/timers.js +49 -0
- package/dist/@vitest/utils/types.d-BCElaP-c.d.ts +53 -0
- package/dist/@vitest/utils/types.d.ts +34 -0
- package/dist/@vitest/utils/types.js +1 -0
- package/dist/browser-compat.js +3 -0
- package/dist/browser.d.ts +46 -0
- package/dist/browser.js +20 -0
- package/dist/chunks/_commonjsHelpers.D26ty3Ew.js +6 -0
- package/dist/chunks/base.CJ0Y4ePK.js +165 -0
- package/dist/chunks/benchmark.B3N2zMcH.js +40 -0
- package/dist/chunks/benchmark.d.DAaHLpsq.d.ts +24 -0
- package/dist/chunks/browser.d.ChKACdzH.d.ts +59 -0
- package/dist/chunks/cac.DVeoLl0M.js +1409 -0
- package/dist/chunks/cli-api.B7PN_QUv.js +13672 -0
- package/dist/chunks/config.d.Cy95HiCx.d.ts +210 -0
- package/dist/chunks/console.Cf-YriPC.js +146 -0
- package/dist/chunks/constants.D_Q9UYh-.js +36 -0
- package/dist/chunks/coverage.AVPTjMgw.js +3292 -0
- package/dist/chunks/coverage.D_JHT54q.js +25 -0
- package/dist/chunks/coverage.d.BZtK59WP.d.ts +37 -0
- package/dist/chunks/creator.DAmOKTvJ.js +673 -0
- package/dist/chunks/date.Bq6ZW5rf.js +73 -0
- package/dist/chunks/defaults.BOqNVLsY.js +74 -0
- package/dist/chunks/env.D4Lgay0q.js +8 -0
- package/dist/chunks/environment.d.CrsxCzP1.d.ts +29 -0
- package/dist/chunks/evaluatedModules.Dg1zASAC.js +17 -0
- package/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts +7 -0
- package/dist/chunks/git.Bm2pzPAa.js +71 -0
- package/dist/chunks/global.d.B15mdLcR.d.ts +99 -0
- package/dist/chunks/globals.DOayXfHP.js +30 -0
- package/dist/chunks/index.6Qv1eEA6.js +109 -0
- package/dist/chunks/index.C5r1PdPD.js +231 -0
- package/dist/chunks/index.Chj8NDwU.js +206 -0
- package/dist/chunks/index.CyBMJtT7.js +727 -0
- package/dist/chunks/index.D3XRDfWc.js +213 -0
- package/dist/chunks/index.D4KonVSU.js +6343 -0
- package/dist/chunks/index.M8mOzt4Y.js +3839 -0
- package/dist/chunks/index.Z5E_ObnR.js +37 -0
- package/dist/chunks/init-forks._y3TW739.js +41 -0
- package/dist/chunks/init-threads.DBO2kn-p.js +18 -0
- package/dist/chunks/init.B6MLFIaN.js +334 -0
- package/dist/chunks/inspector.CvyFGlXm.js +53 -0
- package/dist/chunks/modules.BJuCwlRJ.js +36 -0
- package/dist/chunks/node.Ce0vMQM7.js +14 -0
- package/dist/chunks/plugin.d.CtqpEehP.d.ts +38 -0
- package/dist/chunks/reporters.d.CWXNI2jG.d.ts +3271 -0
- package/dist/chunks/rpc.BoxB0q7B.js +76 -0
- package/dist/chunks/rpc.d.RH3apGEf.d.ts +64 -0
- package/dist/chunks/setup-common.Cm-kSBVi.js +60 -0
- package/dist/chunks/startModuleRunner.DEj0jb3e.js +861 -0
- package/dist/chunks/suite.d.BJWk38HB.d.ts +10 -0
- package/dist/chunks/test.B8ej_ZHS.js +254 -0
- package/dist/chunks/traces.CCmnQaNT.js +217 -0
- package/dist/chunks/traces.d.402V_yFI.d.ts +18 -0
- package/dist/chunks/utils.DvEY5TfP.js +52 -0
- package/dist/chunks/vi.2VT5v0um.js +3919 -0
- package/dist/chunks/vm.D3epNOPZ.js +744 -0
- package/dist/chunks/worker.d.Dyxm8DEL.d.ts +255 -0
- package/dist/cli.js +28 -0
- package/dist/client/.vite/manifest.json +24 -0
- package/dist/client/__vitest__/assets/index-BUCFJtth.js +57 -0
- package/dist/client/__vitest__/assets/index-DlhE0rqZ.css +1 -0
- package/dist/client/__vitest__/bg.png +0 -0
- package/dist/client/__vitest__/favicon.ico +0 -0
- package/dist/client/__vitest__/favicon.svg +5 -0
- package/dist/client/__vitest__/index.html +32 -0
- package/dist/client/__vitest_browser__/orchestrator-S_3e_uzt.js +345 -0
- package/dist/client/__vitest_browser__/tester-k74mgIRa.js +2171 -0
- package/dist/client/__vitest_browser__/utils-uxqdqUz8.js +223 -0
- package/dist/client/error-catcher.js +82 -0
- package/dist/client/esm-client-injector.js +67 -0
- package/dist/client/favicon.svg +5 -0
- package/dist/client/orchestrator.html +35 -0
- package/dist/client/tester/tester.html +13 -0
- package/dist/client.js +456 -0
- package/dist/config.cjs +94 -0
- package/dist/config.d.ts +104 -0
- package/dist/config.js +15 -0
- package/dist/context.js +541 -0
- package/dist/coverage.d.ts +118 -0
- package/dist/coverage.js +23 -0
- package/dist/dummy.js +2 -0
- package/dist/environments.d.ts +22 -0
- package/dist/environments.js +3 -0
- package/dist/expect-element.js +27 -0
- package/dist/index-D6m36C6U.js +6 -0
- package/dist/index-node.js +7 -0
- package/dist/index.d.ts +510 -0
- package/dist/index.js +19 -0
- package/dist/locators.d.ts +354 -0
- package/dist/locators.js +1 -0
- package/dist/mocker.d.ts +1 -0
- package/dist/mocker.js +1 -0
- package/dist/module-evaluator.d.ts +124 -0
- package/dist/module-evaluator.js +343 -0
- package/dist/module-runner-stub.js +44 -0
- package/dist/module-runner.js +17 -0
- package/dist/node.d.ts +251 -0
- package/dist/node.js +98 -0
- package/dist/path.js +7 -0
- package/dist/plugins/browser-client.mjs +2 -0
- package/dist/plugins/browser-context.mjs +2 -0
- package/dist/plugins/browser-locators.mjs +2 -0
- package/dist/plugins/browser-playwright.mjs +2 -0
- package/dist/plugins/browser-preview.mjs +2 -0
- package/dist/plugins/browser-webdriverio.mjs +2 -0
- package/dist/plugins/browser.mjs +2 -0
- package/dist/plugins/expect.mjs +2 -0
- package/dist/plugins/mocker-automock.mjs +2 -0
- package/dist/plugins/mocker-browser.mjs +2 -0
- package/dist/plugins/mocker-node.mjs +2 -0
- package/dist/plugins/mocker-redirect.mjs +2 -0
- package/dist/plugins/mocker-register.mjs +2 -0
- package/dist/plugins/mocker.mjs +2 -0
- package/dist/plugins/pretty-format.mjs +2 -0
- package/dist/plugins/runner-types.mjs +2 -0
- package/dist/plugins/runner-utils.mjs +2 -0
- package/dist/plugins/runner.mjs +2 -0
- package/dist/plugins/snapshot-environment.mjs +2 -0
- package/dist/plugins/snapshot-manager.mjs +2 -0
- package/dist/plugins/snapshot.mjs +2 -0
- package/dist/plugins/spy.mjs +2 -0
- package/dist/plugins/utils-constants.mjs +2 -0
- package/dist/plugins/utils-diff.mjs +2 -0
- package/dist/plugins/utils-display.mjs +2 -0
- package/dist/plugins/utils-error.mjs +2 -0
- package/dist/plugins/utils-helpers.mjs +2 -0
- package/dist/plugins/utils-highlight.mjs +2 -0
- package/dist/plugins/utils-offset.mjs +2 -0
- package/dist/plugins/utils-resolver.mjs +2 -0
- package/dist/plugins/utils-serialize.mjs +2 -0
- package/dist/plugins/utils-source-map.mjs +2 -0
- package/dist/plugins/utils-timers.mjs +2 -0
- package/dist/plugins/utils.mjs +2 -0
- package/dist/reporters.d.ts +27 -0
- package/dist/reporters.js +24 -0
- package/dist/runners.d.ts +50 -0
- package/dist/runners.js +19 -0
- package/dist/shared/screenshotMatcher/types.d.ts +22 -0
- package/dist/snapshot.d.ts +9 -0
- package/dist/snapshot.js +4 -0
- package/dist/spy.js +1 -0
- package/dist/state.js +280 -0
- package/dist/suite.d.ts +5 -0
- package/dist/suite.js +6 -0
- package/dist/types.d.ts +69 -0
- package/dist/vendor/chai.d.mts +1 -0
- package/dist/vendor/chai.mjs +3577 -0
- package/dist/vendor/es-module-lexer.d.mts +193 -0
- package/dist/vendor/es-module-lexer.mjs +79 -0
- package/dist/vendor/estree-walker.d.mts +583 -0
- package/dist/vendor/estree-walker.mjs +339 -0
- package/dist/vendor/expect-type.d.mts +1574 -0
- package/dist/vendor/expect-type.mjs +214 -0
- package/dist/vendor/magic-string.d.mts +261 -0
- package/dist/vendor/magic-string.mjs +1700 -0
- package/dist/vendor/obug.d.mts +56 -0
- package/dist/vendor/obug.mjs +276 -0
- package/dist/vendor/pathe.d.mts +46 -0
- package/dist/vendor/pathe.mjs +496 -0
- package/dist/vendor/picomatch.d.mts +1 -0
- package/dist/vendor/picomatch.mjs +1855 -0
- package/dist/vendor/shared-3g9mwCWP.mjs +31 -0
- package/dist/vendor/std-env.d.mts +88 -0
- package/dist/vendor/std-env.mjs +159 -0
- package/dist/vendor/tinybench.d.mts +317 -0
- package/dist/vendor/tinybench.mjs +504 -0
- package/dist/vendor/tinyexec.d.mts +72 -0
- package/dist/vendor/tinyexec.mjs +637 -0
- package/dist/vendor/tinyglobby.d.mts +157 -0
- package/dist/vendor/tinyglobby.mjs +832 -0
- package/dist/vendor/tinyrainbow.d.mts +60 -0
- package/dist/vendor/tinyrainbow.mjs +93 -0
- package/dist/vendor/vitest_browser.mjs +2 -0
- package/dist/vendor/vitest_internal_browser.mjs +2 -0
- package/dist/vendor/vitest_runner.mjs +2 -0
- package/dist/vendor/vitest_runners.mjs +2 -0
- package/dist/worker.d.ts +32 -0
- package/dist/worker.js +48 -0
- package/dist/workers/forks.js +54 -0
- package/dist/workers/runVmTests.js +95 -0
- package/dist/workers/threads.js +55 -0
- package/dist/workers/vmForks.js +36 -0
- package/dist/workers/vmThreads.js +37 -0
- package/environments.d.ts +1 -0
- package/globals.d.ts +20 -0
- package/import-meta.d.ts +5 -0
- package/importMeta.d.ts +4 -0
- package/index.cjs +5 -0
- package/index.d.cts +1 -0
- package/jsdom.d.ts +6 -0
- package/mocker.d.ts +1 -0
- package/node.d.ts +1 -0
- package/optional-types.d.ts +7 -0
- package/package.json +335 -0
- package/reporters.d.ts +1 -0
- package/runners.d.ts +1 -0
- package/snapshot.d.ts +1 -0
- package/suite.d.ts +1 -0
- package/suppress-warnings.cjs +21 -0
- package/vitest.mjs +2 -0
- package/worker.d.ts +1 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.d.ts
|
|
2
|
+
declare const colorsMap: {
|
|
3
|
+
readonly reset: readonly [0, 0];
|
|
4
|
+
readonly bold: readonly [1, 22, "\u001B[22m\u001B[1m"];
|
|
5
|
+
readonly dim: readonly [2, 22, "\u001B[22m\u001B[2m"];
|
|
6
|
+
readonly italic: readonly [3, 23];
|
|
7
|
+
readonly underline: readonly [4, 24];
|
|
8
|
+
readonly inverse: readonly [7, 27];
|
|
9
|
+
readonly hidden: readonly [8, 28];
|
|
10
|
+
readonly strikethrough: readonly [9, 29];
|
|
11
|
+
readonly black: readonly [30, 39];
|
|
12
|
+
readonly red: readonly [31, 39];
|
|
13
|
+
readonly green: readonly [32, 39];
|
|
14
|
+
readonly yellow: readonly [33, 39];
|
|
15
|
+
readonly blue: readonly [34, 39];
|
|
16
|
+
readonly magenta: readonly [35, 39];
|
|
17
|
+
readonly cyan: readonly [36, 39];
|
|
18
|
+
readonly white: readonly [37, 39];
|
|
19
|
+
readonly gray: readonly [90, 39];
|
|
20
|
+
readonly bgBlack: readonly [40, 49];
|
|
21
|
+
readonly bgRed: readonly [41, 49];
|
|
22
|
+
readonly bgGreen: readonly [42, 49];
|
|
23
|
+
readonly bgYellow: readonly [43, 49];
|
|
24
|
+
readonly bgBlue: readonly [44, 49];
|
|
25
|
+
readonly bgMagenta: readonly [45, 49];
|
|
26
|
+
readonly bgCyan: readonly [46, 49];
|
|
27
|
+
readonly bgWhite: readonly [47, 49];
|
|
28
|
+
readonly blackBright: readonly [90, 39];
|
|
29
|
+
readonly redBright: readonly [91, 39];
|
|
30
|
+
readonly greenBright: readonly [92, 39];
|
|
31
|
+
readonly yellowBright: readonly [93, 39];
|
|
32
|
+
readonly blueBright: readonly [94, 39];
|
|
33
|
+
readonly magentaBright: readonly [95, 39];
|
|
34
|
+
readonly cyanBright: readonly [96, 39];
|
|
35
|
+
readonly whiteBright: readonly [97, 39];
|
|
36
|
+
readonly bgBlackBright: readonly [100, 49];
|
|
37
|
+
readonly bgRedBright: readonly [101, 49];
|
|
38
|
+
readonly bgGreenBright: readonly [102, 49];
|
|
39
|
+
readonly bgYellowBright: readonly [103, 49];
|
|
40
|
+
readonly bgBlueBright: readonly [104, 49];
|
|
41
|
+
readonly bgMagentaBright: readonly [105, 49];
|
|
42
|
+
readonly bgCyanBright: readonly [106, 49];
|
|
43
|
+
readonly bgWhiteBright: readonly [107, 49];
|
|
44
|
+
};
|
|
45
|
+
interface Formatter {
|
|
46
|
+
(input?: unknown): string;
|
|
47
|
+
open: string;
|
|
48
|
+
close: string;
|
|
49
|
+
}
|
|
50
|
+
type ColorName = keyof typeof colorsMap;
|
|
51
|
+
type ColorsMethods = { [Key in ColorName]: Formatter };
|
|
52
|
+
type Colors = ColorsMethods & {
|
|
53
|
+
isColorSupported: boolean;
|
|
54
|
+
reset: (input: unknown) => string;
|
|
55
|
+
};
|
|
56
|
+
declare function getDefaultColors(): Colors;
|
|
57
|
+
declare function isSupported(): boolean;
|
|
58
|
+
declare function createColors(): Colors;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { Colors, Formatter, createColors, getDefaultColors, isSupported };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js
|
|
2
|
+
var d = {
|
|
3
|
+
reset: [0, 0],
|
|
4
|
+
bold: [
|
|
5
|
+
1,
|
|
6
|
+
22,
|
|
7
|
+
"\x1B[22m\x1B[1m"
|
|
8
|
+
],
|
|
9
|
+
dim: [
|
|
10
|
+
2,
|
|
11
|
+
22,
|
|
12
|
+
"\x1B[22m\x1B[2m"
|
|
13
|
+
],
|
|
14
|
+
italic: [3, 23],
|
|
15
|
+
underline: [4, 24],
|
|
16
|
+
inverse: [7, 27],
|
|
17
|
+
hidden: [8, 28],
|
|
18
|
+
strikethrough: [9, 29],
|
|
19
|
+
black: [30, 39],
|
|
20
|
+
red: [31, 39],
|
|
21
|
+
green: [32, 39],
|
|
22
|
+
yellow: [33, 39],
|
|
23
|
+
blue: [34, 39],
|
|
24
|
+
magenta: [35, 39],
|
|
25
|
+
cyan: [36, 39],
|
|
26
|
+
white: [37, 39],
|
|
27
|
+
gray: [90, 39],
|
|
28
|
+
bgBlack: [40, 49],
|
|
29
|
+
bgRed: [41, 49],
|
|
30
|
+
bgGreen: [42, 49],
|
|
31
|
+
bgYellow: [43, 49],
|
|
32
|
+
bgBlue: [44, 49],
|
|
33
|
+
bgMagenta: [45, 49],
|
|
34
|
+
bgCyan: [46, 49],
|
|
35
|
+
bgWhite: [47, 49],
|
|
36
|
+
blackBright: [90, 39],
|
|
37
|
+
redBright: [91, 39],
|
|
38
|
+
greenBright: [92, 39],
|
|
39
|
+
yellowBright: [93, 39],
|
|
40
|
+
blueBright: [94, 39],
|
|
41
|
+
magentaBright: [95, 39],
|
|
42
|
+
cyanBright: [96, 39],
|
|
43
|
+
whiteBright: [97, 39],
|
|
44
|
+
bgBlackBright: [100, 49],
|
|
45
|
+
bgRedBright: [101, 49],
|
|
46
|
+
bgGreenBright: [102, 49],
|
|
47
|
+
bgYellowBright: [103, 49],
|
|
48
|
+
bgBlueBright: [104, 49],
|
|
49
|
+
bgMagentaBright: [105, 49],
|
|
50
|
+
bgCyanBright: [106, 49],
|
|
51
|
+
bgWhiteBright: [107, 49]
|
|
52
|
+
};
|
|
53
|
+
function g(e) {
|
|
54
|
+
return String(e);
|
|
55
|
+
}
|
|
56
|
+
g.open = "";
|
|
57
|
+
g.close = "";
|
|
58
|
+
function B() {
|
|
59
|
+
let e = {
|
|
60
|
+
isColorSupported: !1,
|
|
61
|
+
reset: g
|
|
62
|
+
};
|
|
63
|
+
for (let n in d) e[n] = g;
|
|
64
|
+
return e;
|
|
65
|
+
}
|
|
66
|
+
function h() {
|
|
67
|
+
let e = typeof process != "undefined" ? process : void 0, n = (e == null ? void 0 : e.env) || {}, a = n.FORCE_TTY !== "false", i = (e == null ? void 0 : e.argv) || [];
|
|
68
|
+
return !("NO_COLOR" in n || i.includes("--no-color")) && ("FORCE_COLOR" in n || i.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || a && n.TERM !== "dumb" || "CI" in n) || typeof window != "undefined" && !!window.chrome;
|
|
69
|
+
}
|
|
70
|
+
function f() {
|
|
71
|
+
let e = h(), n = (r, t, u, o) => {
|
|
72
|
+
let l = "", s = 0;
|
|
73
|
+
do
|
|
74
|
+
l += r.substring(s, o) + u, s = o + t.length, o = r.indexOf(t, s);
|
|
75
|
+
while (~o);
|
|
76
|
+
return l + r.substring(s);
|
|
77
|
+
}, a = (r, t, u = r) => {
|
|
78
|
+
let o = (l) => {
|
|
79
|
+
let s = String(l), b = s.indexOf(t, r.length);
|
|
80
|
+
return ~b ? r + n(s, t, u, b) + t : r + s + t;
|
|
81
|
+
};
|
|
82
|
+
return o.open = r, o.close = t, o;
|
|
83
|
+
}, i = { isColorSupported: e }, c = (r) => `\x1B[${r}m`;
|
|
84
|
+
for (let r in d) {
|
|
85
|
+
let t = d[r];
|
|
86
|
+
i[r] = e ? a(c(t[0]), c(t[1]), t[2]) : g;
|
|
87
|
+
}
|
|
88
|
+
return i;
|
|
89
|
+
}
|
|
90
|
+
var C = f();
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
export { f as createColors, C as default, B as getDefaultColors, h as isSupported };
|
package/dist/worker.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { W as WorkerGlobalState, a as WorkerSetupContext, B as BirpcOptions } from './chunks/worker.d.Dyxm8DEL.js';
|
|
2
|
+
import { T as Traces } from './chunks/traces.d.402V_yFI.js';
|
|
3
|
+
import { Awaitable } from './@vitest/utils/index.js';
|
|
4
|
+
import { ModuleRunner } from '@voidzero-dev/vite-plus-core/module-runner';
|
|
5
|
+
import { R as RuntimeRPC } from './chunks/rpc.d.RH3apGEf.js';
|
|
6
|
+
import './@vitest/runner/index.js';
|
|
7
|
+
import './chunks/config.d.Cy95HiCx.js';
|
|
8
|
+
import './@vitest/pretty-format/index.js';
|
|
9
|
+
import './@vitest/snapshot/index.js';
|
|
10
|
+
import './@vitest/utils/diff.js';
|
|
11
|
+
import './chunks/environment.d.CrsxCzP1.js';
|
|
12
|
+
|
|
13
|
+
/** @experimental */
|
|
14
|
+
declare function setupEnvironment(context: WorkerSetupContext): Promise<() => Promise<void>>;
|
|
15
|
+
/** @experimental */
|
|
16
|
+
declare function runBaseTests(method: "run" | "collect", state: WorkerGlobalState, traces: Traces): Promise<void>;
|
|
17
|
+
|
|
18
|
+
type WorkerRpcOptions = Pick<BirpcOptions<RuntimeRPC>, "on" | "off" | "post" | "serialize" | "deserialize">;
|
|
19
|
+
interface VitestWorker extends WorkerRpcOptions {
|
|
20
|
+
runTests: (state: WorkerGlobalState, traces: Traces) => Awaitable<unknown>;
|
|
21
|
+
collectTests: (state: WorkerGlobalState, traces: Traces) => Awaitable<unknown>;
|
|
22
|
+
onModuleRunner?: (moduleRunner: ModuleRunner) => Awaitable<unknown>;
|
|
23
|
+
setup?: (context: WorkerSetupContext) => Promise<() => Promise<unknown>>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Options extends VitestWorker {
|
|
27
|
+
teardown?: () => void;
|
|
28
|
+
}
|
|
29
|
+
/** @experimental */
|
|
30
|
+
declare function init(worker: Options): void;
|
|
31
|
+
|
|
32
|
+
export { init, runBaseTests, setupEnvironment };
|
package/dist/worker.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export { r as runBaseTests, s as setupEnvironment } from './chunks/base.CJ0Y4ePK.js';
|
|
2
|
+
export { i as init } from './chunks/init.B6MLFIaN.js';
|
|
3
|
+
import 'node:vm';
|
|
4
|
+
import './@vitest/spy/index.js';
|
|
5
|
+
import './chunks/index.6Qv1eEA6.js';
|
|
6
|
+
import './@vitest/expect/index.js';
|
|
7
|
+
import './chunks/setup-common.Cm-kSBVi.js';
|
|
8
|
+
import './chunks/coverage.D_JHT54q.js';
|
|
9
|
+
import './@vitest/snapshot/index.js';
|
|
10
|
+
import './@vitest/utils/timers.js';
|
|
11
|
+
import './chunks/utils.DvEY5TfP.js';
|
|
12
|
+
import './chunks/rpc.BoxB0q7B.js';
|
|
13
|
+
import './chunks/index.Chj8NDwU.js';
|
|
14
|
+
import './chunks/test.B8ej_ZHS.js';
|
|
15
|
+
import './@vitest/runner/index.js';
|
|
16
|
+
import './@vitest/utils/helpers.js';
|
|
17
|
+
import './chunks/benchmark.B3N2zMcH.js';
|
|
18
|
+
import './@vitest/runner/utils.js';
|
|
19
|
+
import './@vitest/utils/error.js';
|
|
20
|
+
import './vendor/pathe.mjs';
|
|
21
|
+
import './chunks/vi.2VT5v0um.js';
|
|
22
|
+
import './@vitest/utils/offset.js';
|
|
23
|
+
import './@vitest/utils/source-map.js';
|
|
24
|
+
import './chunks/_commonjsHelpers.D26ty3Ew.js';
|
|
25
|
+
import './chunks/date.Bq6ZW5rf.js';
|
|
26
|
+
import './chunks/evaluatedModules.Dg1zASAC.js';
|
|
27
|
+
import '@voidzero-dev/vite-plus-core/module-runner';
|
|
28
|
+
import './chunks/startModuleRunner.DEj0jb3e.js';
|
|
29
|
+
import 'node:fs';
|
|
30
|
+
import './chunks/modules.BJuCwlRJ.js';
|
|
31
|
+
import 'node:module';
|
|
32
|
+
import 'node:url';
|
|
33
|
+
import './path.js';
|
|
34
|
+
import 'node:path';
|
|
35
|
+
import './@vitest/utils/serialize.js';
|
|
36
|
+
import './module-evaluator.js';
|
|
37
|
+
import './chunks/traces.CCmnQaNT.js';
|
|
38
|
+
import './@vitest/mocker/index.js';
|
|
39
|
+
import 'node:perf_hooks';
|
|
40
|
+
import './chunks/inspector.CvyFGlXm.js';
|
|
41
|
+
import 'node:timers';
|
|
42
|
+
import 'node:timers/promises';
|
|
43
|
+
import 'node:util';
|
|
44
|
+
import './@vitest/utils/constants.js';
|
|
45
|
+
import './chunks/index.Z5E_ObnR.js';
|
|
46
|
+
import './vendor/expect-type.mjs';
|
|
47
|
+
import './chunks/index.CyBMJtT7.js';
|
|
48
|
+
import 'node:console';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { r as runBaseTests, s as setupEnvironment } from '../chunks/base.CJ0Y4ePK.js';
|
|
2
|
+
import { w as workerInit } from '../chunks/init-forks._y3TW739.js';
|
|
3
|
+
import 'node:vm';
|
|
4
|
+
import '../@vitest/spy/index.js';
|
|
5
|
+
import '../chunks/index.6Qv1eEA6.js';
|
|
6
|
+
import '../@vitest/expect/index.js';
|
|
7
|
+
import '../chunks/setup-common.Cm-kSBVi.js';
|
|
8
|
+
import '../chunks/coverage.D_JHT54q.js';
|
|
9
|
+
import '../@vitest/snapshot/index.js';
|
|
10
|
+
import '../@vitest/utils/timers.js';
|
|
11
|
+
import '../chunks/utils.DvEY5TfP.js';
|
|
12
|
+
import '../chunks/rpc.BoxB0q7B.js';
|
|
13
|
+
import '../chunks/index.Chj8NDwU.js';
|
|
14
|
+
import '../chunks/test.B8ej_ZHS.js';
|
|
15
|
+
import '../@vitest/runner/index.js';
|
|
16
|
+
import '../@vitest/utils/helpers.js';
|
|
17
|
+
import '../chunks/benchmark.B3N2zMcH.js';
|
|
18
|
+
import '../@vitest/runner/utils.js';
|
|
19
|
+
import '../@vitest/utils/error.js';
|
|
20
|
+
import '../vendor/pathe.mjs';
|
|
21
|
+
import '../chunks/vi.2VT5v0um.js';
|
|
22
|
+
import '../@vitest/utils/offset.js';
|
|
23
|
+
import '../@vitest/utils/source-map.js';
|
|
24
|
+
import '../chunks/_commonjsHelpers.D26ty3Ew.js';
|
|
25
|
+
import '../chunks/date.Bq6ZW5rf.js';
|
|
26
|
+
import '../chunks/init.B6MLFIaN.js';
|
|
27
|
+
import 'node:fs';
|
|
28
|
+
import 'node:module';
|
|
29
|
+
import 'node:url';
|
|
30
|
+
import '@voidzero-dev/vite-plus-core/module-runner';
|
|
31
|
+
import '../chunks/startModuleRunner.DEj0jb3e.js';
|
|
32
|
+
import '../chunks/modules.BJuCwlRJ.js';
|
|
33
|
+
import '../path.js';
|
|
34
|
+
import 'node:path';
|
|
35
|
+
import '../@vitest/utils/serialize.js';
|
|
36
|
+
import '../module-evaluator.js';
|
|
37
|
+
import '../chunks/traces.CCmnQaNT.js';
|
|
38
|
+
import '../@vitest/mocker/index.js';
|
|
39
|
+
import '../chunks/index.CyBMJtT7.js';
|
|
40
|
+
import 'node:console';
|
|
41
|
+
import '../chunks/inspector.CvyFGlXm.js';
|
|
42
|
+
import '../chunks/evaluatedModules.Dg1zASAC.js';
|
|
43
|
+
import 'node:perf_hooks';
|
|
44
|
+
import 'node:timers';
|
|
45
|
+
import 'node:timers/promises';
|
|
46
|
+
import 'node:util';
|
|
47
|
+
import '../@vitest/utils/constants.js';
|
|
48
|
+
import '../chunks/index.Z5E_ObnR.js';
|
|
49
|
+
import '../vendor/expect-type.mjs';
|
|
50
|
+
|
|
51
|
+
workerInit({
|
|
52
|
+
runTests: runBaseTests,
|
|
53
|
+
setup: setupEnvironment
|
|
54
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
import { performance } from 'node:perf_hooks';
|
|
3
|
+
import timers from 'node:timers';
|
|
4
|
+
import timersPromises from 'node:timers/promises';
|
|
5
|
+
import util from 'node:util';
|
|
6
|
+
import { startTests, collectTests } from '../@vitest/runner/index.js';
|
|
7
|
+
import { KNOWN_ASSET_TYPES } from '../@vitest/utils/constants.js';
|
|
8
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.6Qv1eEA6.js';
|
|
9
|
+
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.Cm-kSBVi.js';
|
|
10
|
+
import { i as index } from '../chunks/index.Z5E_ObnR.js';
|
|
11
|
+
import { c as closeInspector } from '../chunks/inspector.CvyFGlXm.js';
|
|
12
|
+
import { g as getWorkerState } from '../chunks/utils.DvEY5TfP.js';
|
|
13
|
+
import { g as globalExpect } from '../chunks/vi.2VT5v0um.js';
|
|
14
|
+
import '../@vitest/expect/index.js';
|
|
15
|
+
import '../chunks/rpc.BoxB0q7B.js';
|
|
16
|
+
import '../@vitest/utils/timers.js';
|
|
17
|
+
import '../chunks/index.Chj8NDwU.js';
|
|
18
|
+
import '../chunks/test.B8ej_ZHS.js';
|
|
19
|
+
import '../@vitest/utils/helpers.js';
|
|
20
|
+
import '../chunks/benchmark.B3N2zMcH.js';
|
|
21
|
+
import '../@vitest/runner/utils.js';
|
|
22
|
+
import '../@vitest/utils/error.js';
|
|
23
|
+
import '../vendor/pathe.mjs';
|
|
24
|
+
import '../chunks/coverage.D_JHT54q.js';
|
|
25
|
+
import '../@vitest/snapshot/index.js';
|
|
26
|
+
import '../chunks/evaluatedModules.Dg1zASAC.js';
|
|
27
|
+
import '@voidzero-dev/vite-plus-core/module-runner';
|
|
28
|
+
import '../vendor/expect-type.mjs';
|
|
29
|
+
import 'node:url';
|
|
30
|
+
import '../@vitest/spy/index.js';
|
|
31
|
+
import '../@vitest/utils/offset.js';
|
|
32
|
+
import '../@vitest/utils/source-map.js';
|
|
33
|
+
import '../chunks/_commonjsHelpers.D26ty3Ew.js';
|
|
34
|
+
import '../chunks/date.Bq6ZW5rf.js';
|
|
35
|
+
|
|
36
|
+
async function run(method, files, config, moduleRunner, traces) {
|
|
37
|
+
const workerState = getWorkerState();
|
|
38
|
+
await traces.$("vitest.runtime.global_env", () => setupCommonEnv(config));
|
|
39
|
+
Object.defineProperty(globalThis, "__vitest_index__", {
|
|
40
|
+
value: index,
|
|
41
|
+
enumerable: false
|
|
42
|
+
});
|
|
43
|
+
const viteEnvironment = workerState.environment.viteEnvironment || workerState.environment.name;
|
|
44
|
+
globalExpect.setState({ environment: workerState.environment.name });
|
|
45
|
+
if (viteEnvironment === "client") {
|
|
46
|
+
const _require = createRequire(import.meta.url);
|
|
47
|
+
// always mock "required" `css` files, because we cannot process them
|
|
48
|
+
_require.extensions[".css"] = resolveCss;
|
|
49
|
+
_require.extensions[".scss"] = resolveCss;
|
|
50
|
+
_require.extensions[".sass"] = resolveCss;
|
|
51
|
+
_require.extensions[".less"] = resolveCss;
|
|
52
|
+
// since we are using Vite, we can assume how these will be resolved
|
|
53
|
+
KNOWN_ASSET_TYPES.forEach((type) => {
|
|
54
|
+
_require.extensions[`.${type}`] = resolveAsset;
|
|
55
|
+
});
|
|
56
|
+
process.env.SSR = "";
|
|
57
|
+
} else process.env.SSR = "1";
|
|
58
|
+
// @ts-expect-error not typed global for patched timers
|
|
59
|
+
globalThis.__vitest_required__ = {
|
|
60
|
+
util,
|
|
61
|
+
timers,
|
|
62
|
+
timersPromises
|
|
63
|
+
};
|
|
64
|
+
await traces.$("vitest.runtime.coverage.start", () => startCoverageInsideWorker(config.coverage, moduleRunner, { isolate: false }));
|
|
65
|
+
if (config.chaiConfig) setupChaiConfig(config.chaiConfig);
|
|
66
|
+
const [testRunner, snapshotEnvironment] = await Promise.all([traces.$("vitest.runtime.runner", () => resolveTestRunner(config, moduleRunner, traces)), traces.$("vitest.runtime.snapshot.environment", () => resolveSnapshotEnvironment(config, moduleRunner))]);
|
|
67
|
+
config.snapshotOptions.snapshotEnvironment = snapshotEnvironment;
|
|
68
|
+
testRunner.getWorkerContext = void 0;
|
|
69
|
+
workerState.onCancel((reason) => {
|
|
70
|
+
closeInspector(config);
|
|
71
|
+
testRunner.cancel?.(reason);
|
|
72
|
+
});
|
|
73
|
+
workerState.durations.prepare = performance.now() - workerState.durations.prepare;
|
|
74
|
+
const { vi } = index;
|
|
75
|
+
await traces.$(`vitest.test.runner.${method}`, async () => {
|
|
76
|
+
for (const file of files) {
|
|
77
|
+
workerState.filepath = file.filepath;
|
|
78
|
+
if (method === "run") await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => startTests([file], testRunner));
|
|
79
|
+
else await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => collectTests([file], testRunner));
|
|
80
|
+
// reset after tests, because user might call `vi.setConfig` in setupFile
|
|
81
|
+
vi.resetConfig();
|
|
82
|
+
// mocks should not affect different files
|
|
83
|
+
vi.restoreAllMocks();
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
await traces.$("vitest.runtime.coverage.stop", () => stopCoverageInsideWorker(config.coverage, moduleRunner, { isolate: false }));
|
|
87
|
+
}
|
|
88
|
+
function resolveCss(mod) {
|
|
89
|
+
mod.exports = "";
|
|
90
|
+
}
|
|
91
|
+
function resolveAsset(mod, url) {
|
|
92
|
+
mod.exports = url;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export { run };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { s as setupEnvironment, r as runBaseTests } from '../chunks/base.CJ0Y4ePK.js';
|
|
2
|
+
import { w as workerInit } from '../chunks/init-threads.DBO2kn-p.js';
|
|
3
|
+
import 'node:vm';
|
|
4
|
+
import '../@vitest/spy/index.js';
|
|
5
|
+
import '../chunks/index.6Qv1eEA6.js';
|
|
6
|
+
import '../@vitest/expect/index.js';
|
|
7
|
+
import '../chunks/setup-common.Cm-kSBVi.js';
|
|
8
|
+
import '../chunks/coverage.D_JHT54q.js';
|
|
9
|
+
import '../@vitest/snapshot/index.js';
|
|
10
|
+
import '../@vitest/utils/timers.js';
|
|
11
|
+
import '../chunks/utils.DvEY5TfP.js';
|
|
12
|
+
import '../chunks/rpc.BoxB0q7B.js';
|
|
13
|
+
import '../chunks/index.Chj8NDwU.js';
|
|
14
|
+
import '../chunks/test.B8ej_ZHS.js';
|
|
15
|
+
import '../@vitest/runner/index.js';
|
|
16
|
+
import '../@vitest/utils/helpers.js';
|
|
17
|
+
import '../chunks/benchmark.B3N2zMcH.js';
|
|
18
|
+
import '../@vitest/runner/utils.js';
|
|
19
|
+
import '../@vitest/utils/error.js';
|
|
20
|
+
import '../vendor/pathe.mjs';
|
|
21
|
+
import '../chunks/vi.2VT5v0um.js';
|
|
22
|
+
import '../@vitest/utils/offset.js';
|
|
23
|
+
import '../@vitest/utils/source-map.js';
|
|
24
|
+
import '../chunks/_commonjsHelpers.D26ty3Ew.js';
|
|
25
|
+
import '../chunks/date.Bq6ZW5rf.js';
|
|
26
|
+
import '../chunks/init.B6MLFIaN.js';
|
|
27
|
+
import 'node:fs';
|
|
28
|
+
import 'node:module';
|
|
29
|
+
import 'node:url';
|
|
30
|
+
import '@voidzero-dev/vite-plus-core/module-runner';
|
|
31
|
+
import '../chunks/startModuleRunner.DEj0jb3e.js';
|
|
32
|
+
import '../chunks/modules.BJuCwlRJ.js';
|
|
33
|
+
import '../path.js';
|
|
34
|
+
import 'node:path';
|
|
35
|
+
import '../@vitest/utils/serialize.js';
|
|
36
|
+
import '../module-evaluator.js';
|
|
37
|
+
import '../chunks/traces.CCmnQaNT.js';
|
|
38
|
+
import '../@vitest/mocker/index.js';
|
|
39
|
+
import '../chunks/index.CyBMJtT7.js';
|
|
40
|
+
import 'node:console';
|
|
41
|
+
import '../chunks/inspector.CvyFGlXm.js';
|
|
42
|
+
import '../chunks/evaluatedModules.Dg1zASAC.js';
|
|
43
|
+
import 'node:perf_hooks';
|
|
44
|
+
import 'node:timers';
|
|
45
|
+
import 'node:timers/promises';
|
|
46
|
+
import 'node:util';
|
|
47
|
+
import '../@vitest/utils/constants.js';
|
|
48
|
+
import '../chunks/index.Z5E_ObnR.js';
|
|
49
|
+
import '../vendor/expect-type.mjs';
|
|
50
|
+
import 'node:worker_threads';
|
|
51
|
+
|
|
52
|
+
workerInit({
|
|
53
|
+
runTests: runBaseTests,
|
|
54
|
+
setup: setupEnvironment
|
|
55
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { w as workerInit } from '../chunks/init-forks._y3TW739.js';
|
|
2
|
+
import { r as runVmTests } from '../chunks/vm.D3epNOPZ.js';
|
|
3
|
+
import '../chunks/init.B6MLFIaN.js';
|
|
4
|
+
import 'node:fs';
|
|
5
|
+
import 'node:module';
|
|
6
|
+
import 'node:url';
|
|
7
|
+
import '../vendor/pathe.mjs';
|
|
8
|
+
import '@voidzero-dev/vite-plus-core/module-runner';
|
|
9
|
+
import '../chunks/startModuleRunner.DEj0jb3e.js';
|
|
10
|
+
import '../@vitest/utils/helpers.js';
|
|
11
|
+
import '../chunks/modules.BJuCwlRJ.js';
|
|
12
|
+
import '../path.js';
|
|
13
|
+
import 'node:path';
|
|
14
|
+
import '../@vitest/utils/serialize.js';
|
|
15
|
+
import '../module-evaluator.js';
|
|
16
|
+
import 'node:vm';
|
|
17
|
+
import '../chunks/traces.CCmnQaNT.js';
|
|
18
|
+
import '../@vitest/mocker/index.js';
|
|
19
|
+
import '../chunks/index.CyBMJtT7.js';
|
|
20
|
+
import 'node:console';
|
|
21
|
+
import '../@vitest/utils/error.js';
|
|
22
|
+
import '../chunks/rpc.BoxB0q7B.js';
|
|
23
|
+
import '../@vitest/utils/timers.js';
|
|
24
|
+
import '../chunks/index.Chj8NDwU.js';
|
|
25
|
+
import '../chunks/utils.DvEY5TfP.js';
|
|
26
|
+
import '../@vitest/utils/source-map.js';
|
|
27
|
+
import '../chunks/inspector.CvyFGlXm.js';
|
|
28
|
+
import '../chunks/evaluatedModules.Dg1zASAC.js';
|
|
29
|
+
import '../chunks/console.Cf-YriPC.js';
|
|
30
|
+
import 'node:stream';
|
|
31
|
+
import '../vendor/tinyrainbow.mjs';
|
|
32
|
+
import '../chunks/date.Bq6ZW5rf.js';
|
|
33
|
+
import '../@vitest/utils/resolver.js';
|
|
34
|
+
import '../@vitest/utils/constants.js';
|
|
35
|
+
|
|
36
|
+
workerInit({ runTests: runVmTests });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { w as workerInit } from '../chunks/init-threads.DBO2kn-p.js';
|
|
2
|
+
import { r as runVmTests } from '../chunks/vm.D3epNOPZ.js';
|
|
3
|
+
import 'node:worker_threads';
|
|
4
|
+
import '../chunks/init.B6MLFIaN.js';
|
|
5
|
+
import 'node:fs';
|
|
6
|
+
import 'node:module';
|
|
7
|
+
import 'node:url';
|
|
8
|
+
import '../vendor/pathe.mjs';
|
|
9
|
+
import '@voidzero-dev/vite-plus-core/module-runner';
|
|
10
|
+
import '../chunks/startModuleRunner.DEj0jb3e.js';
|
|
11
|
+
import '../@vitest/utils/helpers.js';
|
|
12
|
+
import '../chunks/modules.BJuCwlRJ.js';
|
|
13
|
+
import '../path.js';
|
|
14
|
+
import 'node:path';
|
|
15
|
+
import '../@vitest/utils/serialize.js';
|
|
16
|
+
import '../module-evaluator.js';
|
|
17
|
+
import 'node:vm';
|
|
18
|
+
import '../chunks/traces.CCmnQaNT.js';
|
|
19
|
+
import '../@vitest/mocker/index.js';
|
|
20
|
+
import '../chunks/index.CyBMJtT7.js';
|
|
21
|
+
import 'node:console';
|
|
22
|
+
import '../@vitest/utils/error.js';
|
|
23
|
+
import '../chunks/rpc.BoxB0q7B.js';
|
|
24
|
+
import '../@vitest/utils/timers.js';
|
|
25
|
+
import '../chunks/index.Chj8NDwU.js';
|
|
26
|
+
import '../chunks/utils.DvEY5TfP.js';
|
|
27
|
+
import '../@vitest/utils/source-map.js';
|
|
28
|
+
import '../chunks/inspector.CvyFGlXm.js';
|
|
29
|
+
import '../chunks/evaluatedModules.Dg1zASAC.js';
|
|
30
|
+
import '../chunks/console.Cf-YriPC.js';
|
|
31
|
+
import 'node:stream';
|
|
32
|
+
import '../vendor/tinyrainbow.mjs';
|
|
33
|
+
import '../chunks/date.Bq6ZW5rf.js';
|
|
34
|
+
import '../@vitest/utils/resolver.js';
|
|
35
|
+
import '../@vitest/utils/constants.js';
|
|
36
|
+
|
|
37
|
+
workerInit({ runTests: runVmTests });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/environments'
|
package/globals.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
let suite: typeof import('vitest')['suite']
|
|
3
|
+
let test: typeof import('vitest')['test']
|
|
4
|
+
let chai: typeof import("vitest")["chai"]
|
|
5
|
+
let describe: typeof import('vitest')['describe']
|
|
6
|
+
let it: typeof import('vitest')['it']
|
|
7
|
+
let expectTypeOf: typeof import('vitest')['expectTypeOf']
|
|
8
|
+
let assertType: typeof import('vitest')['assertType']
|
|
9
|
+
let expect: typeof import('vitest')['expect']
|
|
10
|
+
let assert: typeof import('vitest')['assert']
|
|
11
|
+
let vitest: typeof import('vitest')['vitest']
|
|
12
|
+
let vi: typeof import('vitest')['vitest']
|
|
13
|
+
let beforeAll: typeof import('vitest')['beforeAll']
|
|
14
|
+
let afterAll: typeof import('vitest')['afterAll']
|
|
15
|
+
let beforeEach: typeof import('vitest')['beforeEach']
|
|
16
|
+
let afterEach: typeof import('vitest')['afterEach']
|
|
17
|
+
let onTestFailed: typeof import('vitest')['onTestFailed']
|
|
18
|
+
let onTestFinished: typeof import('vitest')['onTestFinished']
|
|
19
|
+
}
|
|
20
|
+
export {}
|
package/import-meta.d.ts
ADDED
package/importMeta.d.ts
ADDED
package/index.cjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
throw new Error(
|
|
2
|
+
'Vitest cannot be imported in a CommonJS module using require(). Please use "import" instead.'
|
|
3
|
+
+ '\n\nIf you are using "import" in your source code, then it\'s possible it was bundled into require() automatically by your bundler. '
|
|
4
|
+
+ 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.',
|
|
5
|
+
)
|
package/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/index.js'
|
package/jsdom.d.ts
ADDED
package/mocker.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/mocker.js'
|
package/node.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/node.js'
|