@storybook/addon-vitest 10.6.0-alpha.0 → 10.6.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_node-chunks/{chunk-JNAAZ5MB.js → chunk-2MLUEQL7.js} +7 -7
- package/dist/_node-chunks/{chunk-LVM5CF37.js → chunk-6IGNMB7X.js} +6 -6
- package/dist/_node-chunks/{chunk-K523NHK5.js → chunk-7QPET5TG.js} +6 -6
- package/dist/_node-chunks/{chunk-BG3V72QD.js → chunk-7Z4NS6UU.js} +9 -9
- package/dist/_node-chunks/{chunk-6JJNYGH2.js → chunk-BGLBKL3F.js} +6 -6
- package/dist/_node-chunks/{chunk-IDOD4YDT.js → chunk-IKPVDR6F.js} +6 -6
- package/dist/_node-chunks/{chunk-Y3PFW5XT.js → chunk-JU2U4OMF.js} +7 -7
- package/dist/_node-chunks/{chunk-F43HGHNQ.js → chunk-X2NF4STG.js} +7 -7
- package/dist/_node-chunks/{vitest.config.3.2.template-ZYIHNNH3.js → vitest.config.3.2.template-WRMJEZIA.js} +7 -7
- package/dist/_node-chunks/{vitest.config.4.template-34JVUSGL.js → vitest.config.4.template-ACGQX5WW.js} +7 -7
- package/dist/_node-chunks/{vitest.config.template-NB7BOGKJ.js → vitest.config.template-6XTYGEFA.js} +7 -7
- package/dist/_node-chunks/{vitest.workspace.template-UBNT4KHY.js → vitest.workspace.template-5BBROKZ7.js} +7 -7
- package/dist/constants.d.ts +100 -96
- package/dist/constants.js +8 -8
- package/dist/index.d.ts +4 -5
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +13 -13
- package/dist/postinstall.js +16 -16
- package/dist/preset.js +12 -12
- package/dist/vitest-plugin/global-setup.js +7 -7
- package/dist/vitest-plugin/index.d.ts +52 -51
- package/dist/vitest-plugin/index.js +11 -11
- package/package.json +5 -5
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__commonJS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7QPET5TG.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/picocolors/picocolors.js
|
|
17
17
|
var require_picocolors = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_picocolors
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2MLUEQL7.js";
|
|
15
15
|
import {
|
|
16
16
|
ADDON_ID2 as ADDON_ID
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BGLBKL3F.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7QPET5TG.js";
|
|
21
21
|
|
|
22
22
|
// src/logger.ts
|
|
23
23
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__commonJS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7QPET5TG.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/semver/internal/constants.js
|
|
17
17
|
var require_constants = __commonJS({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__commonJS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7QPET5TG.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/ts-dedent/dist/index.js
|
|
17
17
|
var require_dist = __commonJS({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7QPET5TG.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.config.3.2.template.ts
|
|
15
15
|
var vitest_config_3_2_template_default = `import path from 'node:path';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7QPET5TG.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.config.4.template.ts
|
|
15
15
|
var vitest_config_4_template_default = `import path from 'node:path';
|
package/dist/_node-chunks/{vitest.config.template-NB7BOGKJ.js → vitest.config.template-6XTYGEFA.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7QPET5TG.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.config.template.ts
|
|
15
15
|
var vitest_config_template_default = `import path from 'node:path';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7QPET5TG.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.workspace.template.ts
|
|
15
15
|
var vitest_workspace_template_default = `import path from 'node:path';
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
import { API_HashEntry, Status, StoryId } from
|
|
2
|
-
import { Report } from
|
|
1
|
+
import { API_HashEntry, Status, StoryId } from "storybook/internal/types";
|
|
2
|
+
import { Report } from "storybook/preview-api";
|
|
3
3
|
|
|
4
|
+
//#region code/addons/vitest/.dts-emit/code/addons/vitest/src/types.d.ts
|
|
4
5
|
interface VitestError extends Error {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
VITEST_TEST_PATH?: string;
|
|
7
|
+
VITEST_TEST_NAME?: string;
|
|
8
|
+
stacks?: Array<{
|
|
9
|
+
line: number;
|
|
10
|
+
column: number;
|
|
11
|
+
file: string;
|
|
12
|
+
method: string;
|
|
13
|
+
}>;
|
|
13
14
|
}
|
|
14
15
|
type ErrorLike = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
message: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
stack?: string;
|
|
19
|
+
cause?: ErrorLike;
|
|
19
20
|
};
|
|
20
21
|
type RunConfig = Record<string, unknown>;
|
|
21
22
|
type RunTrigger = 'run-all' | 'global' | 'watch' | Extract<API_HashEntry['type'], string> | `external:${string}`;
|
|
22
23
|
type A11yRunReport = Report['result'];
|
|
23
24
|
type CurrentRun = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
25
|
+
triggeredBy: RunTrigger | undefined;
|
|
26
|
+
config: RunConfig;
|
|
27
|
+
componentTestStatuses: Status[];
|
|
28
|
+
a11yStatuses: Status[];
|
|
29
|
+
componentTestCount: {
|
|
30
|
+
success: number;
|
|
31
|
+
error: number;
|
|
32
|
+
};
|
|
33
|
+
a11yCount: {
|
|
34
|
+
success: number;
|
|
35
|
+
warning: number;
|
|
36
|
+
error: number;
|
|
37
|
+
};
|
|
38
|
+
a11yReports: Record<StoryId, A11yRunReport[]>;
|
|
39
|
+
reports: Record<StoryId, Report[]>;
|
|
40
|
+
totalTestCount: number | undefined;
|
|
41
|
+
storyIds: StoryId[] | undefined;
|
|
42
|
+
startedAt: number | undefined;
|
|
43
|
+
finishedAt: number | undefined;
|
|
44
|
+
unhandledErrors: VitestError[];
|
|
45
|
+
coverageSummary: {
|
|
46
|
+
status: 'positive' | 'warning' | 'negative' | 'unknown';
|
|
47
|
+
percentage: number;
|
|
48
|
+
} | undefined;
|
|
48
49
|
};
|
|
49
|
-
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region code/addons/vitest/.dts-emit/code/core/src/component-testing/constants.d.ts
|
|
50
52
|
declare const PANEL_ID$1 = "storybook/interactions/panel";
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region code/addons/vitest/.dts-emit/code/addons/a11y/src/constants.d.ts
|
|
55
|
+
declare const ADDON_ID = "storybook/a11y";
|
|
53
56
|
declare const PANEL_ID = "storybook/a11y/panel";
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region code/addons/vitest/.dts-emit/code/addons/vitest/src/constants.d.ts
|
|
59
|
+
declare const ADDON_ID$1 = "storybook/test";
|
|
56
60
|
declare const TEST_PROVIDER_ID = "storybook/test/test-provider";
|
|
57
61
|
declare const STORYBOOK_ADDON_TEST_CHANNEL = "storybook/test/channel";
|
|
58
62
|
declare const TUTORIAL_VIDEO_LINK = "https://youtu.be/Waht9qq7AoA";
|
|
@@ -60,47 +64,47 @@ declare const DOCUMENTATION_LINK = "writing-tests/integrations/vitest-addon";
|
|
|
60
64
|
declare const DOCUMENTATION_FATAL_ERROR_LINK = "writing-tests/integrations/vitest-addon#what-happens-if-vitest-itself-has-an-error";
|
|
61
65
|
declare const COVERAGE_DIRECTORY = "coverage";
|
|
62
66
|
declare const storeOptions: {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
watching: false;
|
|
70
|
-
cancelling: false;
|
|
71
|
-
fatalError: undefined;
|
|
72
|
-
index: {
|
|
73
|
-
entries: {};
|
|
74
|
-
v: number;
|
|
75
|
-
};
|
|
76
|
-
previewAnnotations: never[];
|
|
77
|
-
currentRun: {
|
|
78
|
-
triggeredBy: undefined;
|
|
79
|
-
config: {
|
|
80
|
-
coverage: boolean;
|
|
81
|
-
a11y: boolean;
|
|
82
|
-
};
|
|
83
|
-
componentTestStatuses: never[];
|
|
84
|
-
a11yStatuses: never[];
|
|
85
|
-
a11yReports: {};
|
|
86
|
-
reports: {};
|
|
87
|
-
componentTestCount: {
|
|
88
|
-
success: number;
|
|
89
|
-
error: number;
|
|
90
|
-
};
|
|
91
|
-
a11yCount: {
|
|
92
|
-
success: number;
|
|
93
|
-
warning: number;
|
|
94
|
-
error: number;
|
|
95
|
-
};
|
|
96
|
-
storyIds: undefined;
|
|
97
|
-
totalTestCount: undefined;
|
|
98
|
-
startedAt: undefined;
|
|
99
|
-
finishedAt: undefined;
|
|
100
|
-
unhandledErrors: never[];
|
|
101
|
-
coverageSummary: undefined;
|
|
102
|
-
};
|
|
67
|
+
id: string;
|
|
68
|
+
initialState: {
|
|
69
|
+
config: {
|
|
70
|
+
coverage: false;
|
|
71
|
+
a11y: false;
|
|
103
72
|
};
|
|
73
|
+
watching: false;
|
|
74
|
+
cancelling: false;
|
|
75
|
+
fatalError: undefined;
|
|
76
|
+
index: {
|
|
77
|
+
entries: {};
|
|
78
|
+
v: number;
|
|
79
|
+
};
|
|
80
|
+
previewAnnotations: never[];
|
|
81
|
+
currentRun: {
|
|
82
|
+
triggeredBy: undefined;
|
|
83
|
+
config: {
|
|
84
|
+
coverage: boolean;
|
|
85
|
+
a11y: boolean;
|
|
86
|
+
};
|
|
87
|
+
componentTestStatuses: never[];
|
|
88
|
+
a11yStatuses: never[];
|
|
89
|
+
a11yReports: {};
|
|
90
|
+
reports: {};
|
|
91
|
+
componentTestCount: {
|
|
92
|
+
success: number;
|
|
93
|
+
error: number;
|
|
94
|
+
};
|
|
95
|
+
a11yCount: {
|
|
96
|
+
success: number;
|
|
97
|
+
warning: number;
|
|
98
|
+
error: number;
|
|
99
|
+
};
|
|
100
|
+
storyIds: undefined;
|
|
101
|
+
totalTestCount: undefined;
|
|
102
|
+
startedAt: undefined;
|
|
103
|
+
finishedAt: undefined;
|
|
104
|
+
unhandledErrors: never[];
|
|
105
|
+
coverageSummary: undefined;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
104
108
|
};
|
|
105
109
|
declare const FULL_RUN_TRIGGERS: RunTrigger[];
|
|
106
110
|
declare const STORE_CHANNEL_EVENT_NAME: string;
|
|
@@ -115,20 +119,20 @@ declare const STORYBOOK_TEST_INITIAL_GLOBALS_PROVIDE_KEY = "storybook/test-initi
|
|
|
115
119
|
declare const TRIGGER_TEST_RUN_REQUEST = "storybook/test/trigger-test-run-request";
|
|
116
120
|
declare const TRIGGER_TEST_RUN_RESPONSE = "storybook/test/trigger-test-run-response";
|
|
117
121
|
type TriggerTestRunRequestPayload = {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
requestId: string;
|
|
123
|
+
actor: string;
|
|
124
|
+
storyIds?: string[];
|
|
125
|
+
config?: Record<string, unknown>;
|
|
122
126
|
};
|
|
123
127
|
type TestRunResult = CurrentRun;
|
|
124
128
|
type TriggerTestRunResponsePayload = {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
requestId: string;
|
|
130
|
+
status: 'completed' | 'error' | 'cancelled';
|
|
131
|
+
result?: TestRunResult;
|
|
132
|
+
error?: {
|
|
133
|
+
message: string;
|
|
134
|
+
error?: ErrorLike;
|
|
135
|
+
};
|
|
132
136
|
};
|
|
133
|
-
|
|
134
|
-
export { ADDON_ID
|
|
137
|
+
//#endregion
|
|
138
|
+
export { ADDON_ID as A11Y_ADDON_ID, PANEL_ID as A11Y_PANEL_ID, ADDON_ID$1 as ADDON_ID, PANEL_ID$1 as COMPONENT_TESTING_PANEL_ID, COVERAGE_DIRECTORY, DOCUMENTATION_FATAL_ERROR_LINK, DOCUMENTATION_LINK, FULL_RUN_TRIGGERS, STATUS_STORE_CHANNEL_EVENT_NAME, STATUS_TYPE_ID_A11Y, STATUS_TYPE_ID_COMPONENT_TEST, STORE_CHANNEL_EVENT_NAME, STORYBOOK_ADDON_TEST_CHANNEL, STORYBOOK_CORE_GHOST_STORIES_PROVIDE_KEY, STORYBOOK_CORE_RENDER_ANALYSIS_PROVIDE_KEY, STORYBOOK_TEST_INITIAL_GLOBALS_PROVIDE_KEY, STORYBOOK_TEST_PROVIDE_KEY, TEST_PROVIDER_ID, TEST_PROVIDER_STORE_CHANNEL_EVENT_NAME, TRIGGER_TEST_RUN_REQUEST, TRIGGER_TEST_RUN_RESPONSE, TUTORIAL_VIDEO_LINK, TestRunResult, TriggerTestRunRequestPayload, TriggerTestRunResponsePayload, storeOptions };
|
package/dist/constants.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -33,8 +33,8 @@ import {
|
|
|
33
33
|
TRIGGER_TEST_RUN_RESPONSE,
|
|
34
34
|
TUTORIAL_VIDEO_LINK,
|
|
35
35
|
storeOptions
|
|
36
|
-
} from "./_node-chunks/chunk-
|
|
37
|
-
import "./_node-chunks/chunk-
|
|
36
|
+
} from "./_node-chunks/chunk-BGLBKL3F.js";
|
|
37
|
+
import "./_node-chunks/chunk-7QPET5TG.js";
|
|
38
38
|
export {
|
|
39
39
|
ADDON_ID as A11Y_ADDON_ID,
|
|
40
40
|
PANEL_ID2 as A11Y_PANEL_ID,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { _default as default };
|
|
1
|
+
//#region code/addons/vitest/.dts-emit/code/addons/vitest/src/index.d.ts
|
|
2
|
+
declare function _default(): import("storybook/internal/csf").PreviewAddon<import("storybook/internal/csf").AddonTypes>;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { _default as default };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_gte
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-JU2U4OMF.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__require,
|
|
18
18
|
__toESM
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-7QPET5TG.js";
|
|
20
20
|
|
|
21
21
|
// ../../../node_modules/istanbul-lib-report/node_modules/make-dir/index.js
|
|
22
22
|
var require_make_dir = __commonJS({
|
package/dist/node/vitest.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,19 +12,19 @@ var require = CJS_COMPAT_NODE_MODULE_sy77z0o2ev.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
errorToErrorLike,
|
|
14
14
|
log
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
15
|
+
} from "../_node-chunks/chunk-7Z4NS6UU.js";
|
|
16
16
|
import {
|
|
17
17
|
any,
|
|
18
18
|
up
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
20
|
-
import "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-IKPVDR6F.js";
|
|
20
|
+
import "../_node-chunks/chunk-2MLUEQL7.js";
|
|
21
21
|
import {
|
|
22
22
|
dirname,
|
|
23
23
|
join,
|
|
24
24
|
normalize,
|
|
25
25
|
path,
|
|
26
26
|
resolve
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-6IGNMB7X.js";
|
|
28
28
|
import {
|
|
29
29
|
ADDON_ID2 as ADDON_ID,
|
|
30
30
|
COVERAGE_DIRECTORY,
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
STATUS_TYPE_ID_COMPONENT_TEST,
|
|
33
33
|
STORYBOOK_TEST_PROVIDE_KEY,
|
|
34
34
|
storeOptions
|
|
35
|
-
} from "../_node-chunks/chunk-
|
|
36
|
-
import "../_node-chunks/chunk-
|
|
35
|
+
} from "../_node-chunks/chunk-BGLBKL3F.js";
|
|
36
|
+
import "../_node-chunks/chunk-7QPET5TG.js";
|
|
37
37
|
|
|
38
38
|
// src/node/vitest.ts
|
|
39
39
|
import process2 from "node:process";
|
|
@@ -268,7 +268,7 @@ Please install the @vitest/${isIstanbul ? "coverage-istanbul" : "coverage-v8"} p
|
|
|
268
268
|
async restartVitest({ coverage }) {
|
|
269
269
|
return await this.vitestRestartPromise, this.vitestRestartPromise = new Promise(async (resolve2, reject) => {
|
|
270
270
|
try {
|
|
271
|
-
await this.runningPromise, await this.vitest?.close(), await this.startVitest({ coverage }), resolve2();
|
|
271
|
+
await this.runningPromise, await this.vitest?.close(), this.vitest = null, await this.startVitest({ coverage }), resolve2();
|
|
272
272
|
} catch (e) {
|
|
273
273
|
reject(e);
|
|
274
274
|
} finally {
|
package/dist/postinstall.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
any
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-IKPVDR6F.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-X2NF4STG.js";
|
|
18
18
|
import {
|
|
19
19
|
dirname,
|
|
20
20
|
normalize,
|
|
21
21
|
relative,
|
|
22
22
|
resolve
|
|
23
|
-
} from "./_node-chunks/chunk-
|
|
23
|
+
} from "./_node-chunks/chunk-6IGNMB7X.js";
|
|
24
24
|
import {
|
|
25
25
|
DOCUMENTATION_LINK
|
|
26
|
-
} from "./_node-chunks/chunk-
|
|
26
|
+
} from "./_node-chunks/chunk-BGLBKL3F.js";
|
|
27
27
|
import {
|
|
28
28
|
require_compare,
|
|
29
29
|
require_constants,
|
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
require_parse_options,
|
|
34
34
|
require_re,
|
|
35
35
|
require_semver
|
|
36
|
-
} from "./_node-chunks/chunk-
|
|
36
|
+
} from "./_node-chunks/chunk-JU2U4OMF.js";
|
|
37
37
|
import {
|
|
38
38
|
__commonJS,
|
|
39
39
|
__toESM
|
|
40
|
-
} from "./_node-chunks/chunk-
|
|
40
|
+
} from "./_node-chunks/chunk-7QPET5TG.js";
|
|
41
41
|
|
|
42
42
|
// ../../../node_modules/semver/functions/parse.js
|
|
43
43
|
var require_parse = __commonJS({
|
|
@@ -986,13 +986,13 @@ import {
|
|
|
986
986
|
async function getTemplatePath(name) {
|
|
987
987
|
switch (name) {
|
|
988
988
|
case "vitest.config.template":
|
|
989
|
-
return import("./_node-chunks/vitest.config.template-
|
|
989
|
+
return import("./_node-chunks/vitest.config.template-6XTYGEFA.js");
|
|
990
990
|
case "vitest.config.4.template":
|
|
991
|
-
return import("./_node-chunks/vitest.config.4.template-
|
|
991
|
+
return import("./_node-chunks/vitest.config.4.template-ACGQX5WW.js");
|
|
992
992
|
case "vitest.config.3.2.template":
|
|
993
|
-
return import("./_node-chunks/vitest.config.3.2.template-
|
|
993
|
+
return import("./_node-chunks/vitest.config.3.2.template-WRMJEZIA.js");
|
|
994
994
|
case "vitest.workspace.template":
|
|
995
|
-
return import("./_node-chunks/vitest.workspace.template-
|
|
995
|
+
return import("./_node-chunks/vitest.workspace.template-5BBROKZ7.js");
|
|
996
996
|
default:
|
|
997
997
|
throw new Error(`Unknown template: ${name}`);
|
|
998
998
|
}
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
errorToErrorLike,
|
|
14
14
|
log,
|
|
15
15
|
noop
|
|
16
|
-
} from "./_node-chunks/chunk-
|
|
16
|
+
} from "./_node-chunks/chunk-7Z4NS6UU.js";
|
|
17
17
|
import {
|
|
18
18
|
require_picocolors
|
|
19
|
-
} from "./_node-chunks/chunk-
|
|
19
|
+
} from "./_node-chunks/chunk-2MLUEQL7.js";
|
|
20
20
|
import {
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./_node-chunks/chunk-
|
|
22
|
+
} from "./_node-chunks/chunk-X2NF4STG.js";
|
|
23
23
|
import {
|
|
24
24
|
normalize
|
|
25
|
-
} from "./_node-chunks/chunk-
|
|
25
|
+
} from "./_node-chunks/chunk-6IGNMB7X.js";
|
|
26
26
|
import {
|
|
27
27
|
ADDON_ID2 as ADDON_ID,
|
|
28
28
|
COVERAGE_DIRECTORY,
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
TRIGGER_TEST_RUN_REQUEST,
|
|
34
34
|
TRIGGER_TEST_RUN_RESPONSE,
|
|
35
35
|
storeOptions
|
|
36
|
-
} from "./_node-chunks/chunk-
|
|
36
|
+
} from "./_node-chunks/chunk-BGLBKL3F.js";
|
|
37
37
|
import {
|
|
38
38
|
__toESM
|
|
39
|
-
} from "./_node-chunks/chunk-
|
|
39
|
+
} from "./_node-chunks/chunk-7QPET5TG.js";
|
|
40
40
|
|
|
41
41
|
// src/preset.ts
|
|
42
42
|
import { mkdir } from "node:fs/promises";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require,
|
|
15
15
|
__toESM
|
|
16
|
-
} from "../_node-chunks/chunk-
|
|
16
|
+
} from "../_node-chunks/chunk-7QPET5TG.js";
|
|
17
17
|
|
|
18
18
|
// ../../../node_modules/tree-kill/index.js
|
|
19
19
|
var require_tree_kill = __commonJS({
|
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
import { Plugin } from
|
|
1
|
+
import { Plugin } from "vitest/config";
|
|
2
2
|
|
|
3
|
+
//#region code/addons/vitest/.dts-emit/code/addons/vitest/src/vitest-plugin/types.d.ts
|
|
3
4
|
type UserOptions = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
initialGlobals?: Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* The directory where the Storybook configuration is located, relative to the vitest
|
|
7
|
+
* configuration file. If not provided, the plugin will use '.storybook' in the current working
|
|
8
|
+
* directory.
|
|
9
|
+
*
|
|
10
|
+
* @default '.storybook'
|
|
11
|
+
*/
|
|
12
|
+
configDir?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional script to run Storybook. If provided, Vitest will start Storybook using this script
|
|
15
|
+
* when ran in watch mode.
|
|
16
|
+
*
|
|
17
|
+
* @default undefined
|
|
18
|
+
*/
|
|
19
|
+
storybookScript?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The URL where Storybook is hosted. This is used to provide a link to the story in the test
|
|
22
|
+
* output on failures.
|
|
23
|
+
*
|
|
24
|
+
* @default 'http://localhost:6006'
|
|
25
|
+
*/
|
|
26
|
+
storybookUrl?: string; /** Tags to include, exclude, or skip. These tags are defined as annotations in your story or meta. */
|
|
27
|
+
tags?: {
|
|
28
|
+
include?: string[];
|
|
29
|
+
exclude?: string[];
|
|
30
|
+
skip?: string[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Whether to disable addon docs features while running tests.
|
|
34
|
+
*
|
|
35
|
+
* Most users don't need addon docs for tests, the only scenario where you might need it is if you
|
|
36
|
+
* need to read and parse MDX files as part of rendering your components.
|
|
37
|
+
*
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
disableAddonDocs?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Globals applied to every story run by this project, merged under the values Storybook sets
|
|
43
|
+
* internally. Use it to pin a toolbar global for the whole run — most usefully to test a
|
|
44
|
+
* specific theme: define one Vitest project per theme, each with a different value, e.g.
|
|
45
|
+
* `storybookTest({ initialGlobals: { theme: 'dark' } })`. Equivalent to `initialGlobals` in
|
|
46
|
+
* `.storybook/preview`, but per project instead of global.
|
|
47
|
+
*
|
|
48
|
+
* @default {}
|
|
49
|
+
*/
|
|
50
|
+
initialGlobals?: Record<string, unknown>;
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region code/addons/vitest/.dts-emit/code/addons/vitest/src/vitest-plugin/index.d.ts
|
|
53
54
|
declare const storybookTest: (options?: UserOptions) => Promise<Plugin[]>;
|
|
54
|
-
|
|
55
|
-
export { storybookTest as default, storybookTest };
|
|
55
|
+
//#endregion
|
|
56
|
+
export { storybookTest as default, storybookTest };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amd6gfpha3c from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amd6gfpha3c from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amd6gfpha3c from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amd6gfpha3c.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amd6gfpha3c.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amd6gfpha3c.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_picocolors
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-2MLUEQL7.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-X2NF4STG.js";
|
|
18
18
|
import {
|
|
19
19
|
dirname,
|
|
20
20
|
join,
|
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
relative,
|
|
24
24
|
resolve,
|
|
25
25
|
sep
|
|
26
|
-
} from "../_node-chunks/chunk-
|
|
26
|
+
} from "../_node-chunks/chunk-6IGNMB7X.js";
|
|
27
27
|
import {
|
|
28
28
|
STORYBOOK_CORE_GHOST_STORIES_PROVIDE_KEY,
|
|
29
29
|
STORYBOOK_CORE_RENDER_ANALYSIS_PROVIDE_KEY,
|
|
30
30
|
STORYBOOK_TEST_INITIAL_GLOBALS_PROVIDE_KEY
|
|
31
|
-
} from "../_node-chunks/chunk-
|
|
31
|
+
} from "../_node-chunks/chunk-BGLBKL3F.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__require,
|
|
35
35
|
__toESM
|
|
36
|
-
} from "../_node-chunks/chunk-
|
|
36
|
+
} from "../_node-chunks/chunk-7QPET5TG.js";
|
|
37
37
|
|
|
38
38
|
// ../../../node_modules/braces/lib/utils.js
|
|
39
39
|
var require_utils = __commonJS({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-vitest",
|
|
3
|
-
"version": "10.6.0-alpha.
|
|
3
|
+
"version": "10.6.0-alpha.1",
|
|
4
4
|
"description": "Storybook Vitest addon: Blazing fast component testing using stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@storybook/icons": "^2.0.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@storybook/addon-a11y": "10.6.0-alpha.
|
|
86
|
-
"@storybook/builder-vite": "10.6.0-alpha.
|
|
85
|
+
"@storybook/addon-a11y": "10.6.0-alpha.1",
|
|
86
|
+
"@storybook/builder-vite": "10.6.0-alpha.1",
|
|
87
87
|
"@types/istanbul-lib-report": "^3.0.3",
|
|
88
88
|
"@types/micromatch": "^4.0.0",
|
|
89
89
|
"@types/node": "^22.19.1",
|
|
@@ -104,14 +104,14 @@
|
|
|
104
104
|
"tinyglobby": "^0.2.10",
|
|
105
105
|
"tree-kill": "^1.2.2",
|
|
106
106
|
"ts-dedent": "^2.2.0",
|
|
107
|
-
"typescript": "^
|
|
107
|
+
"typescript": "^6.0.3",
|
|
108
108
|
"vitest": "^4.1.5"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
111
|
"@vitest/browser": "^3.0.0 || ^4.0.0",
|
|
112
112
|
"@vitest/browser-playwright": "^4.0.0",
|
|
113
113
|
"@vitest/runner": "^3.0.0 || ^4.0.0",
|
|
114
|
-
"storybook": "^10.6.0-alpha.
|
|
114
|
+
"storybook": "^10.6.0-alpha.1",
|
|
115
115
|
"vitest": "^3.0.0 || ^4.0.0"
|
|
116
116
|
},
|
|
117
117
|
"peerDependenciesMeta": {
|