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
It would be nice to have an official proposed solution for this. I was looking for answers around here and didn't find anything useful.
Additional context
AFAIK there is currently no way to have type safety for args in Storybook. It would be nice to acknowledge that in docs and save time for people looking for answers :)
The text was updated successfully, but these errors were encountered:
### 💭 Notes
I was trying to come up with some "proper" way of having types in
`args`, but searching Storybook docs and thier GH gave me nothing
useful. I made an issue to kindly point this out to Storybook team:
storybookjs/storybook#31106.
Other than that, it's just a simple test to show how it's done ;)
### 👀 Preview steps
Testing:
1. ℹ️ run storybook
2. go to Design System → ActionIcon → Test Click story
3. open "Interactions" tab
4. 🟢 notice that test PASS
---------
Co-authored-by: Akuukis <Akuukis@users.noreply.github.com>
Describe the problem
In https://storybook.js.org/docs/writing-tests/component-testing#assert-tests-with-vitests-apis there is a line with
await waitFor(() => expect(args.onSubmit).toHaveBeenCalled());
. In this line theargs.onSubmit
will show an error:Property 'onSubmit' does not exist on type '{}'
.It would be nice to have an official proposed solution for this. I was looking for answers around here and didn't find anything useful.
Additional context
AFAIK there is currently no way to have type safety for
args
in Storybook. It would be nice to acknowledge that in docs and save time for people looking for answers :)The text was updated successfully, but these errors were encountered: