Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Non-test build fails when using recommended config for test coverage #25763

Closed
cziemkiewicz-forrester opened this issue Jan 25, 2024 · 0 comments · Fixed by #25828
Closed

Comments

@cziemkiewicz-forrester
Copy link

Describe the bug

I'm trying to implement test coverage using test-runner in a React/Vite project. I used the build configuration recommended in the docs, which works for storybook build --test. However, I started seeing issues when running builds without the --test flag.

After some debugging, I found that including the build: { test: { disabledAddons } } property seems to affect non-test builds. Specifically, when '@storybook/addon-essentials/docs' is present in the disabledAddons array, the plugin storybook:mdx-plugin doesn't load. I confirmed this using DEBUG=vite:config.

To Reproduce

https://stackblitz.com/edit/github-mmquq7-tztnhr?file=.storybook%2Fmain.ts

System

System:
    OS: macOS 12.6.2
    CPU: (8) arm64 Apple M1 Pro
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    npm: 10.3.0 - ~/dev/forr.com/web-fe-tempo/node_modules/.bin/npm <----- active
  Browsers:
    Chrome: 98.0.4758.80
    Safari: 17.0
  npmPackages:
    @storybook/addon-a11y: ^7.6.10 => 7.6.10 
    @storybook/addon-coverage: ^1.0.0 => 1.0.0 
    @storybook/addon-designs: ^7.0.9 => 7.0.9 
    @storybook/addon-essentials: ^7.6.10 => 7.6.10 
    @storybook/addon-interactions: ^7.6.10 => 7.6.10 
    @storybook/addon-links: ^7.6.10 => 7.6.10 
    @storybook/blocks: ^7.6.10 => 7.6.10 
    @storybook/react: ^7.6.10 => 7.6.10 
    @storybook/react-vite: ^7.6.10 => 7.6.10 
    @storybook/test-runner: ^0.16.0 => 0.16.0 
    @storybook/testing-library: ^0.2.2 => 0.2.2 
    storybook: ^7.6.10 => 7.6.10

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants