@storybook/addon-vitest 0.0.0-pr-30601-sha-e8fbce4c → 0.0.0-pr-31579-sha-cf05dec5

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/index.d.ts CHANGED
@@ -1,5 +1,19 @@
1
- import * as storybook_internal_csf from 'storybook/internal/csf';
1
+ import * as core_dist_types from 'storybook/internal/types';
2
2
 
3
- declare const _default: () => storybook_internal_csf.PreviewAddon<storybook_internal_csf.Types>;
3
+ interface TestParameters {
4
+ /**
5
+ * Test addon configuration
6
+ *
7
+ * @see https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
8
+ */
9
+ test: {
10
+ /** Ignore unhandled errors during test execution */
11
+ dangerouslyIgnoreUnhandledErrors?: boolean;
12
+ /** Whether to throw exceptions coming from the play function */
13
+ throwPlayFunctionExceptions?: boolean;
14
+ };
15
+ }
4
16
 
5
- export { _default as default };
17
+ declare const _default: () => core_dist_types.ProjectAnnotations<core_dist_types.Renderer>;
18
+
19
+ export { TestParameters, _default as default };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var csf = require('storybook/internal/csf');
3
+ var previewApi = require('storybook/preview-api');
4
4
 
5
- var index_default=()=>csf.definePreviewAddon({});
5
+ var index_default=()=>previewApi.definePreview({});
6
6
 
7
7
  module.exports = index_default;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { definePreviewAddon } from 'storybook/internal/csf';
1
+ import { definePreview } from 'storybook/preview-api';
2
2
 
3
- var index_default=()=>definePreviewAddon({});
3
+ var index_default=()=>definePreview({});
4
4
 
5
5
  export { index_default as default };
@@ -121,7 +121,7 @@ ${error2.message}`:execaMessage,message=[shortMessage,stderr,stdout].filter(Bool
121
121
  // This is an important step to apply the right configuration when testing your stories.
122
122
  // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
123
123
  setProjectAnnotations([${projectAnnotations.join(", ")}]);
124
- `);let vitestWorkspaceFile=await findFile("vitest.workspace",[".ts",".js",".json"]),viteConfigFile=await findFile("vite.config"),vitestConfigFile=await findFile("vitest.config"),vitestShimFile=await findFile("vitest.shims.d"),rootConfig=vitestConfigFile||viteConfigFile,browserConfig=`{
124
+ `);let vitestWorkspaceFile=await findFile("vitest.workspace",[".ts",".js",".json"])||await findFile("vitest.projects",[".ts",".js",".json"]),viteConfigFile=await findFile("vite.config"),vitestConfigFile=await findFile("vitest.config"),vitestShimFile=await findFile("vitest.shims.d"),rootConfig=vitestConfigFile||viteConfigFile,browserConfig=`{
125
125
  enabled: true,
126
126
  headless: true,
127
127
  provider: 'playwright',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-vitest",
3
- "version": "0.0.0-pr-30601-sha-e8fbce4c",
3
+ "version": "0.0.0-pr-31579-sha-cf05dec5",
4
4
  "description": "Storybook addon for testing components",
5
5
  "keywords": [
6
6
  "storybook-addons",
@@ -124,7 +124,7 @@
124
124
  "peerDependencies": {
125
125
  "@vitest/browser": "^3.0.0",
126
126
  "@vitest/runner": "^3.0.0",
127
- "storybook": "^0.0.0-pr-30601-sha-e8fbce4c",
127
+ "storybook": "^0.0.0-pr-31579-sha-cf05dec5",
128
128
  "vitest": "^3.0.0"
129
129
  },
130
130
  "peerDependenciesMeta": {