You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have also ejected storybook to get the tests to run:
// test-runner-jest.config.jsconst{getJestConfig}=require('@storybook/test-runner');module.exports={// The default configuration comes from @storybook/test-runner
...getJestConfig(),/** Add your own overrides below * @see https://jestjs.io/docs/configuration */rootDir: '../components/',testEnvironmentOptions: {'jest-playwright': {browsers: ['chromium'],},},};
Expected behavior
Tests with coverage work.
Screenshots and/or logs
Error:
[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
Possibly unrelated but I was getting this error when using an external React component (from an installed dependency) within the render/component of a story. It was the external component that could not be instrumented as removing it allowed the coverage tests to run.
npx sb upgrade seems to have resolved my issue now (although I was only using one workspace).
Alternatively you could try specifying where you want coverage from with the includeconfiguration ?
Describe the bug
I have 2 yarn workspaces, one containing my app and another containing storybook.
Steps to reproduce the behavior
I have also ejected storybook to get the tests to run:
Expected behavior
Tests with coverage work.
Screenshots and/or logs
Error:
Environment
The text was updated successfully, but these errors were encountered: