Open
Description
Describe the bug
Latest version of user-event lib recommends to use a little bit different API. Instead of using userEvent.click
they suggest to create user-event
instance first by invoking const events = userEvent.setup()
. And then use any event available e.g. await events.click()
. userEvent.setup
returns an object directly without promise, so it shouldn't be awaiten. But the rule "storybook/await-interactions" reports an issue there.
To Reproduce
- Install latest version of
@storybook/testing-library
(0.2.0 in my case) - Import
userEvent
constructor. - Define play function to any story you need.
- Declare
userEvent.setup();
statement as it recommended in latest user-event section. - See the validation error.
Expected behavior
Validation error should not be triggered on setup
method.
Metadata
Metadata
Assignees
Labels
No labels