@storybook/addon-vitest 0.0.0-pr-32458-sha-f9395070 → 0.0.0-pr-32984-sha-9ba02343

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/manager.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  STATUS_TYPE_ID_COMPONENT_TEST,
10
10
  TEST_PROVIDER_ID,
11
11
  storeOptions
12
- } from "./_browser-chunks/chunk-CAYLRBRX.js";
12
+ } from "./_browser-chunks/chunk-RPDOPHZX.js";
13
13
  import {
14
14
  __name
15
15
  } from "./_browser-chunks/chunk-JK72E6FR.js";
@@ -37,8 +37,8 @@ import { addons as addons2 } from "storybook/manager-api";
37
37
 
38
38
  // src/components/GlobalErrorModal.tsx
39
39
  import React, { useContext } from "react";
40
- import { Button, Modal } from "storybook/internal/components";
41
- import { SyncIcon } from "@storybook/icons";
40
+ import { Button, IconButton, Modal } from "storybook/internal/components";
41
+ import { CloseIcon, SyncIcon } from "@storybook/icons";
42
42
  import { useStorybookApi } from "storybook/manager-api";
43
43
  import { styled } from "storybook/theming";
44
44
  var ModalBar = styled.div({
@@ -85,6 +85,7 @@ __name(ErrorCause, "ErrorCause");
85
85
  function GlobalErrorModal({ onRerun, storeState }) {
86
86
  const api = useStorybookApi();
87
87
  const { isModalOpen, setModalOpen } = useContext(GlobalErrorContext);
88
+ const handleClose = /* @__PURE__ */ __name(() => setModalOpen?.(false), "handleClose");
88
89
  const troubleshootURL = api.getDocsUrl({
89
90
  subpath: DOCUMENTATION_FATAL_ERROR_LINK,
90
91
  versioned: true,
@@ -95,7 +96,7 @@ function GlobalErrorModal({ onRerun, storeState }) {
95
96
  currentRun: { unhandledErrors }
96
97
  } = storeState;
97
98
  const content = fatalError ? React.createElement(React.Fragment, null, React.createElement("p", null, fatalError.error.name || "Error"), fatalError.message && React.createElement("p", null, fatalError.message), fatalError.error.message && React.createElement("p", null, fatalError.error.message), fatalError.error.stack && React.createElement("p", null, fatalError.error.stack), fatalError.error.cause && React.createElement(ErrorCause, { error: fatalError.error.cause })) : unhandledErrors.length > 0 ? React.createElement("ol", null, unhandledErrors.map((error) => React.createElement("li", { key: error.name + error.message }, React.createElement("p", null, error.name, ": ", error.message), error.VITEST_TEST_PATH && React.createElement("p", null, 'This error originated in "', React.createElement("b", null, error.VITEST_TEST_PATH), `". It doesn't mean the error was thrown inside the file itself, but while it was running.`), error.VITEST_TEST_NAME && React.createElement(React.Fragment, null, React.createElement("p", null, `The latest test that might've caused the error is "`, React.createElement("b", null, error.VITEST_TEST_NAME), '". It might mean one of the following:'), React.createElement("ul", null, React.createElement("li", null, "The error was thrown, while Vitest was running this test."), React.createElement("li", null, "If the error occurred after the test had been completed, this was the last documented test before it was thrown."))), error.stacks && React.createElement(React.Fragment, null, React.createElement("p", null, React.createElement("b", null, "Stacks:")), React.createElement("ul", null, error.stacks.map((stack) => React.createElement("li", { key: stack.file + stack.line + stack.column }, stack.file, ":", stack.line, ":", stack.column, " - ", stack.method || "unknown method")))), error.stack && React.createElement("p", null, error.stack), error.cause ? React.createElement(ErrorCause, { error: error.cause }) : null))) : null;
98
- return React.createElement(Modal, { ariaLabel: "Storybook Tests error details", onOpenChange: setModalOpen, open: isModalOpen }, React.createElement(ModalBar, null, React.createElement(ModalTitle, null, "Storybook Tests error details"), React.createElement(ModalActionBar, null, React.createElement(Button, { onClick: onRerun, variant: "ghost", ariaLabel: false }, React.createElement(SyncIcon, null), "Rerun"), React.createElement(Button, { variant: "ghost", ariaLabel: false, asChild: true }, React.createElement("a", { target: "_blank", href: troubleshootURL, rel: "noreferrer" }, "Troubleshoot")), React.createElement(Modal.Close, null))), React.createElement(ModalStackTrace, null, content, React.createElement("br", null), React.createElement("br", null), "Troubleshoot:", " ", React.createElement(TroubleshootLink, { target: "_blank", href: troubleshootURL }, troubleshootURL)));
99
+ return React.createElement(Modal, { onEscapeKeyDown: handleClose, onInteractOutside: handleClose, open: isModalOpen }, React.createElement(ModalBar, null, React.createElement(ModalTitle, null, "Storybook Tests error details"), React.createElement(ModalActionBar, null, React.createElement(Button, { onClick: onRerun, variant: "ghost" }, React.createElement(SyncIcon, null), "Rerun"), React.createElement(Button, { variant: "ghost", asChild: true }, React.createElement("a", { target: "_blank", href: troubleshootURL, rel: "noreferrer" }, "Troubleshoot")), React.createElement(IconButton, { onClick: handleClose, "aria-label": "Close modal" }, React.createElement(CloseIcon, null)))), React.createElement(ModalStackTrace, null, content, React.createElement("br", null), React.createElement("br", null), "Troubleshoot:", " ", React.createElement(TroubleshootLink, { target: "_blank", href: troubleshootURL }, troubleshootURL)));
99
100
  }
100
101
  __name(GlobalErrorModal, "GlobalErrorModal");
101
102
 
@@ -433,11 +434,12 @@ var useTestProvider = /* @__PURE__ */ __name((api, entryId) => {
433
434
  // src/components/TestProviderRender.tsx
434
435
  import React3 from "react";
435
436
  import {
436
- Button as Button2,
437
437
  Form,
438
+ IconButton as IconButton2,
438
439
  ListItem,
439
440
  ProgressSpinner,
440
- ToggleButton
441
+ TooltipNote,
442
+ WithTooltip
441
443
  } from "storybook/internal/components";
442
444
  import { EyeIcon, InfoIcon, PlayHollowIcon, StopAltIcon } from "@storybook/icons";
443
445
  import { addons } from "storybook/manager-api";
@@ -550,8 +552,8 @@ var TestStatusIcon = styled3.div(
550
552
  "--status-background": `${theme.color.defaultText}66`
551
553
  },
552
554
  ({ status, theme }) => status === "unknown" && {
553
- "--status-color": theme.textMutedColor,
554
- "--status-background": `${theme.textMutedColor}66`
555
+ "--status-color": theme.color.mediumdark,
556
+ "--status-background": `${theme.color.mediumdark}66`
555
557
  }
556
558
  );
557
559
 
@@ -640,61 +642,79 @@ var TestProviderRender = /* @__PURE__ */ __name(({
640
642
  isSettingsUpdated
641
643
  }
642
644
  )), React3.createElement(Actions, null, !entry && React3.createElement(
643
- ToggleButton,
645
+ WithTooltip,
644
646
  {
645
- ariaLabel: isRunning ? "Watch mode (cannot toggle while running)" : "Watch mode",
646
- tooltip: isRunning ? "Watch mode unavailable while running" : `Watch mode is ${watching ? "enabled" : "disabled"}`,
647
- padding: "small",
648
- size: "medium",
649
- variant: "ghost",
650
- pressed: watching,
651
- onClick: () => store.send({
652
- type: "TOGGLE_WATCHING",
653
- payload: {
654
- to: !watching
655
- }
656
- }),
657
- disabled: isRunning
647
+ hasChrome: false,
648
+ trigger: "hover",
649
+ tooltip: React3.createElement(TooltipNote, { note: `${watching ? "Disable" : "Enable"} watch mode` })
658
650
  },
659
- React3.createElement(EyeIcon, null)
651
+ React3.createElement(
652
+ IconButton2,
653
+ {
654
+ "aria-label": `${watching ? "Disable" : "Enable"} watch mode`,
655
+ size: "medium",
656
+ active: watching,
657
+ onClick: () => store.send({
658
+ type: "TOGGLE_WATCHING",
659
+ payload: {
660
+ to: !watching
661
+ }
662
+ }),
663
+ disabled: isRunning
664
+ },
665
+ React3.createElement(EyeIcon, null)
666
+ )
660
667
  ), isRunning ? React3.createElement(
661
- Button2,
668
+ WithTooltip,
662
669
  {
663
- ariaLabel: cancelling ? "Stop test run (already stopping...)" : "Stop test run",
664
- padding: "none",
665
- size: "medium",
666
- variant: "ghost",
667
- onClick: () => store.send({
668
- type: "CANCEL_RUN"
669
- }),
670
- disabled: cancelling || isStarting
670
+ hasChrome: false,
671
+ trigger: "hover",
672
+ tooltip: React3.createElement(TooltipNote, { note: cancelling ? "Stopping..." : "Stop test run" })
671
673
  },
672
674
  React3.createElement(
673
- Progress,
675
+ IconButton2,
674
676
  {
675
- percentage: finishedTestCount && storeState.currentRun.totalTestCount ? finishedTestCount / storeState.currentRun.totalTestCount * 100 : void 0
677
+ "aria-label": cancelling ? "Stopping..." : "Stop test run",
678
+ padding: "none",
679
+ size: "medium",
680
+ onClick: () => store.send({
681
+ type: "CANCEL_RUN"
682
+ }),
683
+ disabled: cancelling || isStarting
676
684
  },
677
- React3.createElement(StopIcon, null)
685
+ React3.createElement(
686
+ Progress,
687
+ {
688
+ percentage: finishedTestCount && storeState.currentRun.totalTestCount ? finishedTestCount / storeState.currentRun.totalTestCount * 100 : void 0
689
+ },
690
+ React3.createElement(StopIcon, null)
691
+ )
678
692
  )
679
693
  ) : React3.createElement(
680
- Button2,
694
+ WithTooltip,
681
695
  {
682
- ariaLabel: "Start test run",
683
- padding: "small",
684
- size: "medium",
685
- variant: "ghost",
686
- onClick: () => {
687
- let storyIds;
688
- if (entry) {
689
- storyIds = entry.type === "story" ? [entry.id] : api.findAllLeafStoryIds(entry.id);
690
- }
691
- store.send({
692
- type: "TRIGGER_RUN",
693
- payload: { storyIds, triggeredBy: entry?.type ?? "global" }
694
- });
695
- }
696
+ hasChrome: false,
697
+ trigger: "hover",
698
+ tooltip: React3.createElement(TooltipNote, { note: "Start test run" })
696
699
  },
697
- React3.createElement(PlayHollowIcon, null)
700
+ React3.createElement(
701
+ IconButton2,
702
+ {
703
+ "aria-label": "Start test run",
704
+ size: "medium",
705
+ onClick: () => {
706
+ let storyIds;
707
+ if (entry) {
708
+ storyIds = entry.type === "story" ? [entry.id] : api.findAllLeafStoryIds(entry.id);
709
+ }
710
+ store.send({
711
+ type: "TRIGGER_RUN",
712
+ payload: { storyIds, triggeredBy: entry?.type ?? "global" }
713
+ });
714
+ }
715
+ },
716
+ React3.createElement(PlayHollowIcon, null)
717
+ )
698
718
  ))), React3.createElement(Extras, null, React3.createElement(Row, null, React3.createElement(
699
719
  ListItem,
700
720
  {
@@ -703,24 +723,35 @@ var TestProviderRender = /* @__PURE__ */ __name(({
703
723
  icon: entry ? null : React3.createElement(Form.Checkbox, { checked: true, disabled: true })
704
724
  }
705
725
  ), React3.createElement(
706
- Button2,
726
+ WithTooltip,
707
727
  {
708
- ariaLabel: `${componentTestStatusLabel}${componentTestStatusValueToStoryIds["status-value:error"].length + componentTestStatusValueToStoryIds["status-value:warning"].length > 0 ? ` (${componentTestStatusValueToStoryIds["status-value:error"].length + componentTestStatusValueToStoryIds["status-value:warning"].length} errors or warnings so far)` : ""}`,
709
- tooltip: componentTestStatusLabel,
710
- padding: "small",
711
- size: "medium",
712
- variant: "ghost",
713
- disabled: componentTestStatusValueToStoryIds["status-value:error"].length === 0 && componentTestStatusValueToStoryIds["status-value:warning"].length === 0 && componentTestStatusValueToStoryIds["status-value:success"].length === 0,
714
- onClick: () => {
715
- openPanel({
716
- api,
717
- panelId: PANEL_ID,
718
- entryId: componentTestStatusValueToStoryIds["status-value:error"][0] ?? componentTestStatusValueToStoryIds["status-value:warning"][0] ?? componentTestStatusValueToStoryIds["status-value:success"][0] ?? entry?.id
719
- });
720
- }
728
+ hasChrome: false,
729
+ trigger: "hover",
730
+ tooltip: React3.createElement(TooltipNote, { note: componentTestStatusLabel })
721
731
  },
722
- React3.createElement(TestStatusIcon, { status: componentTestStatusIcon, isRunning }),
723
- componentTestStatusValueToStoryIds["status-value:error"].length + componentTestStatusValueToStoryIds["status-value:warning"].length || null
732
+ React3.createElement(
733
+ IconButton2,
734
+ {
735
+ size: "medium",
736
+ disabled: componentTestStatusValueToStoryIds["status-value:error"].length === 0 && componentTestStatusValueToStoryIds["status-value:warning"].length === 0 && componentTestStatusValueToStoryIds["status-value:success"].length === 0,
737
+ onClick: () => {
738
+ openPanel({
739
+ api,
740
+ panelId: PANEL_ID,
741
+ entryId: componentTestStatusValueToStoryIds["status-value:error"][0] ?? componentTestStatusValueToStoryIds["status-value:warning"][0] ?? componentTestStatusValueToStoryIds["status-value:success"][0] ?? entry?.id
742
+ });
743
+ }
744
+ },
745
+ React3.createElement(
746
+ TestStatusIcon,
747
+ {
748
+ status: componentTestStatusIcon,
749
+ "aria-label": componentTestStatusLabel,
750
+ isRunning
751
+ }
752
+ ),
753
+ componentTestStatusValueToStoryIds["status-value:error"].length + componentTestStatusValueToStoryIds["status-value:warning"].length || null
754
+ )
724
755
  )), !entry && React3.createElement(Row, null, React3.createElement(
725
756
  ListItem,
726
757
  {
@@ -738,53 +769,39 @@ var TestProviderRender = /* @__PURE__ */ __name(({
738
769
  }
739
770
  )
740
771
  }
741
- ), watching || currentRun.triggeredBy && !FULL_RUN_TRIGGERS.includes(currentRun.triggeredBy) ? React3.createElement(
742
- Button2,
743
- {
744
- padding: "small",
745
- size: "medium",
746
- variant: "ghost",
747
- disabled: true,
748
- ariaLabel: watching ? `Coverage unavailable in watch mode` : `Coverage unavailable when running focused tests`
749
- },
750
- React3.createElement(InfoIcon, null)
751
- ) : currentRun.coverageSummary ? React3.createElement(
752
- Button2,
772
+ ), React3.createElement(
773
+ WithTooltip,
753
774
  {
754
- asChild: true,
755
- padding: "small",
756
- size: "medium",
757
- variant: "ghost",
758
- ariaLabel: (
759
- // FIXME: I can't deduce from the original tooltip logic whether this use case
760
- // is logically possible or not. It is a reachable conditional branch in the original code.
761
- isRunning ? "Open coverage report (testing still in progress)" : `Open coverage report (${currentRun.coverageSummary.percentage}% coverage)`
775
+ hasChrome: false,
776
+ trigger: "hover",
777
+ tooltip: React3.createElement(
778
+ TooltipNote,
779
+ {
780
+ note: watching ? "Unavailable in watch mode" : currentRun.triggeredBy && !FULL_RUN_TRIGGERS.includes(currentRun.triggeredBy) ? "Unavailable when running focused tests" : isRunning ? "Testing in progress" : currentRun.coverageSummary ? "View coverage report" : fatalError ? "Component tests crashed" : "Run tests to calculate coverage"
781
+ }
762
782
  )
763
783
  },
764
- React3.createElement("a", { href: "/coverage/index.html", target: "_blank" }, React3.createElement(
784
+ watching || currentRun.triggeredBy && !FULL_RUN_TRIGGERS.includes(currentRun.triggeredBy) ? React3.createElement(IconButton2, { size: "medium", disabled: true }, React3.createElement(
785
+ InfoIcon,
786
+ {
787
+ "aria-label": watching ? `Coverage is unavailable in watch mode` : `Coverage is unavailable when running focused tests`
788
+ }
789
+ )) : currentRun.coverageSummary ? React3.createElement(IconButton2, { asChild: true, size: "medium" }, React3.createElement("a", { href: "/coverage/index.html", target: "_blank", "aria-label": "Open coverage report" }, React3.createElement(
765
790
  TestStatusIcon,
766
791
  {
767
792
  isRunning,
768
793
  percentage: currentRun.coverageSummary.percentage,
769
- status: currentRun.coverageSummary.status
794
+ status: currentRun.coverageSummary.status,
795
+ "aria-label": `Coverage status: ${currentRun.coverageSummary.status}`
770
796
  }
771
- ), currentRun.coverageSummary.percentage, "%")
772
- ) : React3.createElement(
773
- Button2,
774
- {
775
- padding: "small",
776
- size: "medium",
777
- variant: "ghost",
778
- disabled: true,
779
- ariaLabel: isRunning ? "Coverage unavailable, testing still in progress" : fatalError ? "Coverage unavailable, component tests crashed" : "Coverage unavailable, run tests first"
780
- },
781
- React3.createElement(
797
+ ), React3.createElement("span", { "aria-label": `${currentRun.coverageSummary.percentage} percent coverage` }, currentRun.coverageSummary.percentage, "%"))) : React3.createElement(IconButton2, { size: "medium", disabled: true }, React3.createElement(
782
798
  TestStatusIcon,
783
799
  {
784
800
  isRunning,
785
- status: fatalError ? "critical" : "unknown"
801
+ status: fatalError ? "critical" : "unknown",
802
+ "aria-label": "Coverage status: unknown"
786
803
  }
787
- )
804
+ ))
788
805
  )), hasA11yAddon && React3.createElement(Row, null, React3.createElement(
789
806
  ListItem,
790
807
  {
@@ -803,23 +820,35 @@ var TestProviderRender = /* @__PURE__ */ __name(({
803
820
  )
804
821
  }
805
822
  ), React3.createElement(
806
- Button2,
823
+ WithTooltip,
807
824
  {
808
- ariaLabel: a11yStatusLabel,
809
- padding: "small",
810
- size: "medium",
811
- variant: "ghost",
812
- disabled: a11yStatusValueToStoryIds["status-value:error"].length === 0 && a11yStatusValueToStoryIds["status-value:warning"].length === 0 && a11yStatusValueToStoryIds["status-value:success"].length === 0,
813
- onClick: () => {
814
- openPanel({
815
- api,
816
- entryId: a11yStatusValueToStoryIds["status-value:error"][0] ?? a11yStatusValueToStoryIds["status-value:warning"][0] ?? a11yStatusValueToStoryIds["status-value:success"][0] ?? entry?.id,
817
- panelId: PANEL_ID2
818
- });
819
- }
825
+ hasChrome: false,
826
+ trigger: "hover",
827
+ tooltip: React3.createElement(TooltipNote, { note: a11yStatusLabel })
820
828
  },
821
- React3.createElement(TestStatusIcon, { status: a11yStatusIcon, isRunning }),
822
- a11yStatusValueToStoryIds["status-value:error"].length + a11yStatusValueToStoryIds["status-value:warning"].length || null
829
+ React3.createElement(
830
+ IconButton2,
831
+ {
832
+ size: "medium",
833
+ disabled: a11yStatusValueToStoryIds["status-value:error"].length === 0 && a11yStatusValueToStoryIds["status-value:warning"].length === 0 && a11yStatusValueToStoryIds["status-value:success"].length === 0,
834
+ onClick: () => {
835
+ openPanel({
836
+ api,
837
+ entryId: a11yStatusValueToStoryIds["status-value:error"][0] ?? a11yStatusValueToStoryIds["status-value:warning"][0] ?? a11yStatusValueToStoryIds["status-value:success"][0] ?? entry?.id,
838
+ panelId: PANEL_ID2
839
+ });
840
+ }
841
+ },
842
+ React3.createElement(
843
+ TestStatusIcon,
844
+ {
845
+ status: a11yStatusIcon,
846
+ "aria-label": a11yStatusLabel,
847
+ isRunning
848
+ }
849
+ ),
850
+ a11yStatusValueToStoryIds["status-value:error"].length + a11yStatusValueToStoryIds["status-value:warning"].length || null
851
+ )
823
852
  ))));
824
853
  }, "TestProviderRender");
825
854
 
@@ -1,23 +1,23 @@
1
- import CJS_COMPAT_NODE_URL_tznil47bafs from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_tznil47bafs from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_tznil47bafs from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6ciuwemjw56 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6ciuwemjw56 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6ciuwemjw56 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_tznil47bafs.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_tznil47bafs.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_tznil47bafs.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6ciuwemjw56.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6ciuwemjw56.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6ciuwemjw56.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-FZDYOCCE.js";
14
+ } from "../_node-chunks/chunk-CQC7N3G6.js";
15
15
  import {
16
16
  __commonJS,
17
17
  __name,
18
18
  __require,
19
19
  __toESM
20
- } from "../_node-chunks/chunk-KZIDXS4U.js";
20
+ } from "../_node-chunks/chunk-5GSBMHHJ.js";
21
21
 
22
22
  // ../../node_modules/istanbul-lib-report/node_modules/make-dir/index.js
23
23
  var require_make_dir = __commonJS({
@@ -1,38 +1,37 @@
1
- import CJS_COMPAT_NODE_URL_tznil47bafs from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_tznil47bafs from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_tznil47bafs from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6ciuwemjw56 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6ciuwemjw56 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6ciuwemjw56 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_tznil47bafs.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_tznil47bafs.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_tznil47bafs.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6ciuwemjw56.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6ciuwemjw56.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6ciuwemjw56.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
  log
14
- } from "../_node-chunks/chunk-6K54YTGN.js";
14
+ } from "../_node-chunks/chunk-SV5YHLFQ.js";
15
15
  import {
16
- any,
17
- errorToErrorLike
18
- } from "../_node-chunks/chunk-5CCESRRQ.js";
16
+ any
17
+ } from "../_node-chunks/chunk-QDHBF4XB.js";
19
18
  import {
20
19
  ADDON_ID,
21
20
  COVERAGE_DIRECTORY,
22
21
  STATUS_TYPE_ID_A11Y,
23
22
  STATUS_TYPE_ID_COMPONENT_TEST,
24
23
  storeOptions
25
- } from "../_node-chunks/chunk-PH4NUGE7.js";
26
- import "../_node-chunks/chunk-JTOLRAOL.js";
24
+ } from "../_node-chunks/chunk-56EU3ER3.js";
25
+ import "../_node-chunks/chunk-GNINXAYC.js";
27
26
  import {
28
27
  dirname,
29
28
  join,
30
29
  normalize,
31
30
  path
32
- } from "../_node-chunks/chunk-ZRHBOMCR.js";
31
+ } from "../_node-chunks/chunk-HEUKUUYY.js";
33
32
  import {
34
33
  __name
35
- } from "../_node-chunks/chunk-KZIDXS4U.js";
34
+ } from "../_node-chunks/chunk-5GSBMHHJ.js";
36
35
 
37
36
  // src/node/vitest.ts
38
37
  import process2 from "node:process";
@@ -174,6 +173,18 @@ function throttle(func, throttleMs, { signal, edges = ["leading", "trailing"] }
174
173
  }
175
174
  __name(throttle, "throttle");
176
175
 
176
+ // src/utils.ts
177
+ function errorToErrorLike(error) {
178
+ return {
179
+ message: error.message,
180
+ name: error.name,
181
+ // avoid duplicating the error message in the stack trace
182
+ stack: error.stack?.replace(error.message, ""),
183
+ cause: error.cause && error.cause instanceof Error ? errorToErrorLike(error.cause) : void 0
184
+ };
185
+ }
186
+ __name(errorToErrorLike, "errorToErrorLike");
187
+
177
188
  // src/node/vitest-manager.ts
178
189
  import { existsSync } from "node:fs";
179
190
  import { getProjectRoot, resolvePathInStorybookCache } from "storybook/internal/common";