-
Notifications
You must be signed in to change notification settings - Fork 4
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] Impossible to instrument code properly with storybook-react-rsbuild #127
Comments
I've not tried the reproduce steps yet, but by reading the addon's code https://github.com/storybookjs/addon-coverage/blob/main/src/preset.ts#L47. I think it could not work with storybook-rsbuild as it only apply for I think we need a general way to make storybook-build-builder could apply the |
I found a way to make storybook-rsbuild to compatible with arbitrary webpack supported addons. Will implement this in days. |
Cross-posting storybookjs/addon-coverage#48
Describe the bug
When upgrading to
storybook-react-rsbuild
fromwebpack
orvite
setup, the code instrumentation does not work properly to obtain code coverage.Dependencies:
Rsbuild config:
Storybook config:
Steps to reproduce the behavior
test-storybook -- --coverage
commandtest-storybook
commandExpected behavior
The storybook test command should work with coverage and proper code instrumentation no matter if webpack, vite, rsbuild, or another bundler is used.
Screenshots and/or logs
All tests failing with error below
[Test runner] An error occurred when evaluating code coverage: The code in this story is not instrumented, which means the coverage setup is likely not correct. More info: https://github.com/storybookjs/test-runner#setting-up-code-coverage
Environment
The text was updated successfully, but these errors were encountered: