storybookjs / test-runner

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

Fix: Define test function as early as possible #445

Open yannbf opened 3 months ago

yannbf commented 3 months ago

Closes #68

What I did

Attempt on fixing #68 by injecting the __test script as early as possible

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.17.1--canary.445.4041ab4.0
:sparkles: Test out this PR locally via: ```bash npm install @storybook/test-runner@0.17.1--canary.445.4041ab4.0 # or yarn add @storybook/test-runner@0.17.1--canary.445.4041ab4.0 ```