@storybook/addon-vitest 0.0.0-pr-31987-sha-2117325e → 0.0.0-pr-31819-sha-36ca675c
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/dist/_browser-chunks/chunk-A47P2DCZ.js +11 -0
- package/dist/_browser-chunks/chunk-VMSW5DPM.js +60 -0
- package/dist/_node-chunks/chunk-C4NXJJA3.js +324 -0
- package/dist/_node-chunks/chunk-CIKGVIS6.js +223 -0
- package/dist/_node-chunks/chunk-FMQIQP6D.js +96 -0
- package/dist/_node-chunks/chunk-KVKHJ5OL.js +46 -0
- package/dist/_node-chunks/chunk-N3OFRDD3.js +80 -0
- package/dist/_node-chunks/chunk-VFT2PRGV.js +5002 -0
- package/dist/_node-chunks/chunk-W26ZMSD3.js +143 -0
- package/dist/_node-chunks/chunk-XWQZZ2C3.js +1586 -0
- package/dist/index.js +9 -6
- package/dist/manager.js +5571 -8
- package/dist/node/coverage-reporter.js +1395 -4
- package/dist/node/vitest.js +564 -17
- package/dist/postinstall.js +1165 -93
- package/dist/preset.js +268 -32
- package/dist/vitest-plugin/global-setup.js +146 -6
- package/dist/vitest-plugin/index.js +2589 -43
- package/dist/vitest-plugin/setup-file.js +28 -9
- package/dist/vitest-plugin/test-utils.js +68 -8
- package/package.json +17 -89
- package/static/coverage-reporter.cjs +10 -0
- package/dist/chunk-55WZLVGN.mjs +0 -11
- package/dist/chunk-JKRQGT2U.mjs +0 -10
- package/dist/index.mjs +0 -5
- package/dist/node/coverage-reporter.d.ts +0 -184
- package/dist/node/coverage-reporter.mjs +0 -12
- package/dist/node/vitest.d.ts +0 -2
- package/dist/node/vitest.mjs +0 -19
- package/dist/vitest-plugin/global-setup.d.ts +0 -6
- package/dist/vitest-plugin/global-setup.mjs +0 -13
- package/dist/vitest-plugin/index.mjs +0 -28
- package/dist/vitest-plugin/setup-file.d.ts +0 -14
- package/dist/vitest-plugin/setup-file.mjs +0 -9
- package/dist/vitest-plugin/test-utils.d.ts +0 -20
- package/dist/vitest-plugin/test-utils.mjs +0 -8
- package/manager.js +0 -1
- package/manager.mjs +0 -1
- package/postinstall.js +0 -1
- package/postinstall.mjs +0 -1
- package/preset.js +0 -1
- package/preset.mjs +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
import {
|
|
12
|
+
c as r,
|
|
13
|
+
f as s
|
|
14
|
+
} from "./chunk-W26ZMSD3.js";
|
|
15
|
+
import {
|
|
16
|
+
a as o
|
|
17
|
+
} from "./chunk-KVKHJ5OL.js";
|
|
18
|
+
|
|
19
|
+
// ../../core/src/component-testing/constants.ts
|
|
20
|
+
var a = "storybook/interactions", c = `${a}/panel`, p = "writing-tests/integrations/vitest-addon", I = `${p}#what-happens-when-there-are-different-test-results-in-multiple-environments`;
|
|
21
|
+
|
|
22
|
+
// ../a11y/src/constants.ts
|
|
23
|
+
var t = "storybook/a11y", _ = `${t}/panel`;
|
|
24
|
+
var f = `${t}/result`, m = `${t}/request`, y = `${t}/running`, R = `${t}/error`, d = `${t}/manual`, D = `${t}/select`, E = "writing-tests/accessibility-testing", S = `${E}#why-are-my-tests-failing-in-different-environments`;
|
|
25
|
+
|
|
26
|
+
// src/constants.ts
|
|
27
|
+
var n = "storybook/test", v = `${n}/test-provider`, L = "STORYBOOK_ADDON_TEST_CHANNEL";
|
|
28
|
+
var T = "writing-tests/integrations/vitest-addon", b = `${T}#what-happens-if-vitest-itself-has-an-error`, g = "coverage", P = [
|
|
29
|
+
"@storybook/nextjs",
|
|
30
|
+
"@storybook/nextjs-vite",
|
|
31
|
+
"@storybook/react-vite",
|
|
32
|
+
"@storybook/svelte-vite",
|
|
33
|
+
"@storybook/vue3-vite",
|
|
34
|
+
"@storybook/html-vite",
|
|
35
|
+
"@storybook/web-components-vite",
|
|
36
|
+
"@storybook/sveltekit",
|
|
37
|
+
"@storybook/react-native-web-vite"
|
|
38
|
+
], N = {
|
|
39
|
+
id: n,
|
|
40
|
+
initialState: {
|
|
41
|
+
config: {
|
|
42
|
+
coverage: !1,
|
|
43
|
+
a11y: !1
|
|
44
|
+
},
|
|
45
|
+
watching: !1,
|
|
46
|
+
cancelling: !1,
|
|
47
|
+
fatalError: void 0,
|
|
48
|
+
indexUrl: void 0,
|
|
49
|
+
previewAnnotations: [],
|
|
50
|
+
currentRun: {
|
|
51
|
+
triggeredBy: void 0,
|
|
52
|
+
config: {
|
|
53
|
+
coverage: !1,
|
|
54
|
+
a11y: !1
|
|
55
|
+
},
|
|
56
|
+
componentTestCount: {
|
|
57
|
+
success: 0,
|
|
58
|
+
error: 0
|
|
59
|
+
},
|
|
60
|
+
a11yCount: {
|
|
61
|
+
success: 0,
|
|
62
|
+
warning: 0,
|
|
63
|
+
error: 0
|
|
64
|
+
},
|
|
65
|
+
storyIds: void 0,
|
|
66
|
+
totalTestCount: void 0,
|
|
67
|
+
startedAt: void 0,
|
|
68
|
+
finishedAt: void 0,
|
|
69
|
+
unhandledErrors: [],
|
|
70
|
+
coverageSummary: void 0
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var U = `UNIVERSAL_STORE:${N.id}`, h = "UNIVERSAL_STORE:storybook/status", k = "UNIVERSAL_STORE:storybook/test-provider", C = "storybook/component-test", M = "storybook/a11y";
|
|
75
|
+
|
|
76
|
+
// ../../core/src/shared/utils/module.ts
|
|
77
|
+
import { fileURLToPath as l, pathToFileURL as A } from "node:url";
|
|
78
|
+
var u = /* @__PURE__ */ o((...e) => typeof import.meta.resolve != "function" && process.env.VITEST === "true" ? (console.warn(
|
|
79
|
+
"importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
|
|
80
|
+
), A(e[0]).href) : import.meta.resolve(...e), "importMetaResolve"), j = /* @__PURE__ */ o((e, i) => s(l(u(r(e, "package.json"), i))), "resolvePackageDir");
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
n as a,
|
|
84
|
+
L as b,
|
|
85
|
+
T as c,
|
|
86
|
+
g as d,
|
|
87
|
+
P as e,
|
|
88
|
+
N as f,
|
|
89
|
+
U as g,
|
|
90
|
+
h,
|
|
91
|
+
k as i,
|
|
92
|
+
C as j,
|
|
93
|
+
M as k,
|
|
94
|
+
u as l,
|
|
95
|
+
j as m
|
|
96
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
var g = Object.create;
|
|
12
|
+
var e = Object.defineProperty;
|
|
13
|
+
var h = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var i = Object.getOwnPropertyNames;
|
|
15
|
+
var j = Object.getPrototypeOf, k = Object.prototype.hasOwnProperty;
|
|
16
|
+
var m = (a, b) => e(a, "name", { value: b, configurable: !0 }), n = /* @__PURE__ */ ((a) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(a, {
|
|
17
|
+
get: (b, c) => (typeof require < "u" ? require : b)[c]
|
|
18
|
+
}) : a)(function(a) {
|
|
19
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
20
|
+
throw Error('Dynamic require of "' + a + '" is not supported');
|
|
21
|
+
});
|
|
22
|
+
var o = (a, b) => () => (b || a((b = { exports: {} }).exports, b), b.exports), p = (a, b) => {
|
|
23
|
+
for (var c in b)
|
|
24
|
+
e(a, c, { get: b[c], enumerable: !0 });
|
|
25
|
+
}, l = (a, b, c, f) => {
|
|
26
|
+
if (b && typeof b == "object" || typeof b == "function")
|
|
27
|
+
for (let d of i(b))
|
|
28
|
+
!k.call(a, d) && d !== c && e(a, d, { get: () => b[d], enumerable: !(f = h(b, d)) || f.enumerable });
|
|
29
|
+
return a;
|
|
30
|
+
};
|
|
31
|
+
var q = (a, b, c) => (c = a != null ? g(j(a)) : {}, l(
|
|
32
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
33
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
34
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
35
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
36
|
+
b || !a || !a.__esModule ? e(c, "default", { value: a, enumerable: !0 }) : c,
|
|
37
|
+
a
|
|
38
|
+
));
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
m as a,
|
|
42
|
+
n as b,
|
|
43
|
+
o as c,
|
|
44
|
+
p as d,
|
|
45
|
+
q as e
|
|
46
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
import {
|
|
12
|
+
a as t,
|
|
13
|
+
c as o
|
|
14
|
+
} from "./chunk-KVKHJ5OL.js";
|
|
15
|
+
|
|
16
|
+
// ../../node_modules/picocolors/picocolors.js
|
|
17
|
+
var d = o((c, h) => {
|
|
18
|
+
var l = process || {}, n = l.argv || [], g = l.env || {}, B = !(g.NO_COLOR || n.includes("--no-color")) && (!!g.FORCE_COLOR || n.includes("--color") || l.platform === "win32" || (l.stdout || {}).isTTY && g.TERM !== "dumb" || !!g.CI), u = /* @__PURE__ */ t((m, b, i = m) => (e) => {
|
|
19
|
+
let r = "" + e, x = r.indexOf(b, m.length);
|
|
20
|
+
return ~x ? m + s(r, b, i, x) + b : m + r + b;
|
|
21
|
+
}, "formatter"), s = /* @__PURE__ */ t((m, b, i, e) => {
|
|
22
|
+
let r = "", x = 0;
|
|
23
|
+
do
|
|
24
|
+
r += m.substring(x, e) + i, x = e + b.length, e = m.indexOf(b, x);
|
|
25
|
+
while (~e);
|
|
26
|
+
return r + m.substring(x);
|
|
27
|
+
}, "replaceClose"), a = /* @__PURE__ */ t((m = B) => {
|
|
28
|
+
let b = m ? u : () => String;
|
|
29
|
+
return {
|
|
30
|
+
isColorSupported: m,
|
|
31
|
+
reset: b("\x1B[0m", "\x1B[0m"),
|
|
32
|
+
bold: b("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
33
|
+
dim: b("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
34
|
+
italic: b("\x1B[3m", "\x1B[23m"),
|
|
35
|
+
underline: b("\x1B[4m", "\x1B[24m"),
|
|
36
|
+
inverse: b("\x1B[7m", "\x1B[27m"),
|
|
37
|
+
hidden: b("\x1B[8m", "\x1B[28m"),
|
|
38
|
+
strikethrough: b("\x1B[9m", "\x1B[29m"),
|
|
39
|
+
black: b("\x1B[30m", "\x1B[39m"),
|
|
40
|
+
red: b("\x1B[31m", "\x1B[39m"),
|
|
41
|
+
green: b("\x1B[32m", "\x1B[39m"),
|
|
42
|
+
yellow: b("\x1B[33m", "\x1B[39m"),
|
|
43
|
+
blue: b("\x1B[34m", "\x1B[39m"),
|
|
44
|
+
magenta: b("\x1B[35m", "\x1B[39m"),
|
|
45
|
+
cyan: b("\x1B[36m", "\x1B[39m"),
|
|
46
|
+
white: b("\x1B[37m", "\x1B[39m"),
|
|
47
|
+
gray: b("\x1B[90m", "\x1B[39m"),
|
|
48
|
+
bgBlack: b("\x1B[40m", "\x1B[49m"),
|
|
49
|
+
bgRed: b("\x1B[41m", "\x1B[49m"),
|
|
50
|
+
bgGreen: b("\x1B[42m", "\x1B[49m"),
|
|
51
|
+
bgYellow: b("\x1B[43m", "\x1B[49m"),
|
|
52
|
+
bgBlue: b("\x1B[44m", "\x1B[49m"),
|
|
53
|
+
bgMagenta: b("\x1B[45m", "\x1B[49m"),
|
|
54
|
+
bgCyan: b("\x1B[46m", "\x1B[49m"),
|
|
55
|
+
bgWhite: b("\x1B[47m", "\x1B[49m"),
|
|
56
|
+
blackBright: b("\x1B[90m", "\x1B[39m"),
|
|
57
|
+
redBright: b("\x1B[91m", "\x1B[39m"),
|
|
58
|
+
greenBright: b("\x1B[92m", "\x1B[39m"),
|
|
59
|
+
yellowBright: b("\x1B[93m", "\x1B[39m"),
|
|
60
|
+
blueBright: b("\x1B[94m", "\x1B[39m"),
|
|
61
|
+
magentaBright: b("\x1B[95m", "\x1B[39m"),
|
|
62
|
+
cyanBright: b("\x1B[96m", "\x1B[39m"),
|
|
63
|
+
whiteBright: b("\x1B[97m", "\x1B[39m"),
|
|
64
|
+
bgBlackBright: b("\x1B[100m", "\x1B[49m"),
|
|
65
|
+
bgRedBright: b("\x1B[101m", "\x1B[49m"),
|
|
66
|
+
bgGreenBright: b("\x1B[102m", "\x1B[49m"),
|
|
67
|
+
bgYellowBright: b("\x1B[103m", "\x1B[49m"),
|
|
68
|
+
bgBlueBright: b("\x1B[104m", "\x1B[49m"),
|
|
69
|
+
bgMagentaBright: b("\x1B[105m", "\x1B[49m"),
|
|
70
|
+
bgCyanBright: b("\x1B[106m", "\x1B[49m"),
|
|
71
|
+
bgWhiteBright: b("\x1B[107m", "\x1B[49m")
|
|
72
|
+
};
|
|
73
|
+
}, "createColors");
|
|
74
|
+
h.exports = a();
|
|
75
|
+
h.exports.createColors = a;
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
d as a
|
|
80
|
+
};
|