[bug] should not require main.js on standalone remote mode
zb-sj opened this issue · comments
Jeong, Sejun commented
Describe the bug
Hi, I'm trying to leverage test-runner to do some e2e screenshot generation on aws lambda.
As far as I know, main.js configurations aren't or shouldn't be required for remote standalone testing that was implemented at #31
In fact, I could run my test just fine with random main.js like:
// copied straight from the document
const config = {
// Required
// 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)'],
// Optional
addons: ['@storybook/addon-essentials'],
docs: {
autodocs: 'tag',
},
staticDirs: ['../public'],
};
export default config;
This is the stderr if no main.js is provided:
[test-storybook] Detected a remote Storybook URL, running in index json mode. To disable this, run the command again with --no-index-json
[test-storybook] Could not load main.js in .storybook. Is the ".storybook" config directory correct? You can change it by using --config-dir <path-to-dir>
To Reproduce
Steps to reproduce the behavior:
- Run
npx test-storybook --url $STORYBOOK_URL --no-cache
on any non-storybook environment
Expected behavior
it should run just fine without .storybook/main.js
Additional context
Yann Braga commented
Hey @zb-sj well said, that makes total sense and is a bug. I'm fixing it! Thanks for reporting!