generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Labels
Description
Describe the bug
This is what the readme mentions
If you are running tests against a local Storybook but for some reason want to run in "index.json mode", you can pass the --index-json flag:
yarn test-storybook --index-jsonHowever the code looks something like this (permalink)
const shouldRunIndexJson = runnerOptions.indexJson !== false && !isLocalStorybookIp;Which will resolve to false even if the flag is passed. This seems like a bug.
The correct code should be
const shouldRunIndexJson = runnerOptions.indexJson === true || (runnerOptions.indexJson !== false && !isLocalStorybookIp);To Reproduce
You can easily test this using any locally available pre-built storybook. Start a local server using http-server and try to run tests using --index-json flag. It will not be honored and storybook will try to read the storybook configuration which is not needed in index-json mode.
System
NA. Happening in every system.Additional context
No response
Reactions are currently unavailable