storybookjs / test-runner

🚕 Turn stories into executable tests
https://storybook.js.org/docs/writing-tests/interaction-testing
MIT License
229 stars 72 forks source link

Fix: Skip requiring a main.js file in index.json mode #464

Closed yannbf closed 4 months ago

yannbf commented 4 months ago

Closes #451

What I did

This PR enables the test-runner to run standalone, even in non-storybook directories with a single command, for instance:

npx @storybook/test-runner --url https://mealdrop.vercel.app/storybook

Checklist for Contributors

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

Checklist for Maintainers

📦 Published PR as canary version: 0.18.1--canary.464.5ad382f.0
:sparkles: Test out this PR locally via: ```bash npm install @storybook/test-runner@0.18.1--canary.464.5ad382f.0 # or yarn add @storybook/test-runner@0.18.1--canary.464.5ad382f.0 ```