Skip to content

Is an await required for getByRole in Interaction tests? #23975

Closed Answered by yannbf
hakshu25 asked this question in Help
Discussion options

You must be logged in to vote

Hey there @hakshu25! Thanks for writing this out.

The types should be correct – any of the Storybook testing utilities are promises. They wrap the original functionality (testing-library, jest, etc), instrument them and turn them into promises. Here's a more detailed explanation regarding why promises are needed:
storybookjs/jest#39 (comment)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hakshu25
Comment options

Answer selected by hakshu25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants