-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25278 from storybookjs/docs_add_test_troubleshooting
Docs: Test Coverage troubleshoot optimized builds (cherry picked from commit 4495fa9)
- Loading branch information
1 parent
e7a2ca2
commit d9be321
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
docs/snippets/common/storybook-coverage-addon-optimized-config.js.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
```js | ||
// .storybook/main.js | ||
|
||
export default { | ||
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite) | ||
framework: '@storybook/your-framework', | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-coverage', | ||
], | ||
build: { | ||
test: { | ||
disabledAddons: ['@storybook/addon-docs', '@storybook/addon-essentials/docs'], | ||
}, | ||
}, | ||
}; | ||
``` |
24 changes: 24 additions & 0 deletions
24
docs/snippets/common/storybook-coverage-addon-optimized-config.ts.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
```ts | ||
// .storybook/main.ts | ||
|
||
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite) | ||
import type { StorybookConfig } from '@storybook/your-framework'; | ||
|
||
const config: StorybookConfig = { | ||
framework: '@storybook/your-framework', | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-coverage', | ||
], | ||
build: { | ||
test: { | ||
disabledAddons: ['@storybook/addon-docs', '@storybook/addon-essentials/docs'], | ||
}, | ||
}, | ||
}; | ||
|
||
export default config; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters