@storybook/addon-vitest 11.0.0-beta.5 → 11.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRequire as
|
|
1
|
+
import { createRequire as CJS_COMPAT_CREATE_REQUIRE_s3399qpvfzj } from "node:module";var require = CJS_COMPAT_CREATE_REQUIRE_s3399qpvfzj(import.meta.url);
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/postinstall.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import * as fs from "node:fs/promises";
|
|
22
22
|
import { writeFile } from "node:fs/promises";
|
|
23
23
|
import os from "node:os";
|
|
24
|
-
import { AddonVitestService } from "storybook/internal/cli";
|
|
24
|
+
import { AddonVitestService, refreshAgentInstructions } from "storybook/internal/cli";
|
|
25
25
|
import {
|
|
26
26
|
JsPackageManagerFactory,
|
|
27
27
|
formatFileContent,
|
|
@@ -460,7 +460,7 @@ async function postInstall(options) {
|
|
|
460
460
|
}
|
|
461
461
|
let runCommand = rootConfig ? "npx vitest --project=storybook" : "npx vitest";
|
|
462
462
|
if (errors.length === 0)
|
|
463
|
-
logger.step(CLI_COLORS.success("@storybook/addon-vitest setup completed successfully")), logger.log(import_ts_dedent.dedent`
|
|
463
|
+
await refreshAgentInstructions({ testSupported: !0, sawEveryStorybook: !1 }), logger.step(CLI_COLORS.success("@storybook/addon-vitest setup completed successfully")), logger.log(import_ts_dedent.dedent`
|
|
464
464
|
@storybook/addon-vitest is now configured and you're ready to run your tests!
|
|
465
465
|
Here are a couple of tips to get you started:
|
|
466
466
|
|
package/dist/preset.js
CHANGED
|
@@ -1147,7 +1147,6 @@ import {
|
|
|
1147
1147
|
} from "storybook/internal/core-server";
|
|
1148
1148
|
import {
|
|
1149
1149
|
defineToolset,
|
|
1150
|
-
getSkillCommand,
|
|
1151
1150
|
getToolset
|
|
1152
1151
|
} from "storybook/open-service";
|
|
1153
1152
|
|
|
@@ -1707,14 +1706,9 @@ var errorLikeSchema = object({
|
|
|
1707
1706
|
!0
|
|
1708
1707
|
)
|
|
1709
1708
|
});
|
|
1710
|
-
function describeRun(a11yEnabled
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
First run ${skill} once and follow it: it has the rules for running the tests and fixing what fails.` : ""}
|
|
1714
|
-
Run them after editing anything that changes how the UI looks \u2014 components, stories, styles, CSS, themes, colors, or design tokens \u2014 shell-level substitutes like typecheck, lint, or package.json test scripts do not replace this.
|
|
1715
|
-
Use changed for focused runs on what you changed (faster while iterating), or files for specific story files,
|
|
1716
|
-
and leave all of them out to run every story.
|
|
1717
|
-
Use this continuously to monitor test results as you work on your UI components and stories.
|
|
1709
|
+
function describeRun(a11yEnabled) {
|
|
1710
|
+
return `Run story tests.
|
|
1711
|
+
Use changed for the stories your changes affect, or files for specific story files, and leave both out to run every story.
|
|
1718
1712
|
Results will include passing/failing status` + (a11yEnabled ? `, and accessibility violation reports.
|
|
1719
1713
|
For visual/design accessibility violations (for example color contrast), ask the user before changing styles.` : ".");
|
|
1720
1714
|
}
|
|
@@ -1785,7 +1779,7 @@ function createTestToolset({
|
|
|
1785
1779
|
input: runInputSchema,
|
|
1786
1780
|
positional: "files",
|
|
1787
1781
|
title: "Run Storybook tests",
|
|
1788
|
-
description: (
|
|
1782
|
+
description: () => describeRun(a11yEnabled),
|
|
1789
1783
|
handler: async (input, ctx) => {
|
|
1790
1784
|
let done = await queue.wait();
|
|
1791
1785
|
try {
|
|
@@ -2354,7 +2354,7 @@ import {
|
|
|
2354
2354
|
var import_picocolors = __toESM(require_picocolors(), 1), import_sirv = __toESM(require_build(), 1), import_ts_dedent2 = __toESM(require_dist(), 1);
|
|
2355
2355
|
|
|
2356
2356
|
// package.json
|
|
2357
|
-
var version = "11.0.0-
|
|
2357
|
+
var version = "11.0.0-rc.0";
|
|
2358
2358
|
|
|
2359
2359
|
// ../../builders/builder-vite/src/utils/without-vite-plugins.ts
|
|
2360
2360
|
var withoutVitePlugins = async (plugins = [], namesToRemove) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-vitest",
|
|
3
|
-
"version": "11.0.0-
|
|
3
|
+
"version": "11.0.0-rc.0",
|
|
4
4
|
"description": "Storybook Vitest addon: Blazing fast component testing using stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"@storybook/icons": "^2.0.2"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@storybook/addon-a11y": "11.0.0-
|
|
85
|
-
"@storybook/builder-vite": "11.0.0-
|
|
84
|
+
"@storybook/addon-a11y": "11.0.0-rc.0",
|
|
85
|
+
"@storybook/builder-vite": "11.0.0-rc.0",
|
|
86
86
|
"@types/istanbul-lib-report": "^3.0.3",
|
|
87
87
|
"@types/micromatch": "^4.0.0",
|
|
88
88
|
"@types/node": "^22.19.1",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"peerDependencies": {
|
|
111
111
|
"@vitest/browser": "^4.0.0 || ^5.0.0",
|
|
112
112
|
"@vitest/browser-playwright": "^4.0.0 || ^5.0.0",
|
|
113
|
-
"storybook": "^11.0.0-
|
|
113
|
+
"storybook": "^11.0.0-rc.0",
|
|
114
114
|
"vitest": "^4.0.0 || ^5.0.0"
|
|
115
115
|
},
|
|
116
116
|
"peerDependenciesMeta": {
|