Update docs/writing-tests/interaction-testing.mdx

Co-authored-by: Yann Braga <yannbf@gmail.com>
This commit is contained in:
Kasper Peulen 2024-07-08 11:32:24 +02:00 committed by GitHub
parent 45a83bd282
commit 58ea726f91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,7 +92,7 @@ This code will run before every story in the project.
### Run code before each story
Sometimes you might need to run the same code before each story in a file.
You can do this by adding an asynchronous `beforeEach` function to the meta.
You can do this by adding an asynchronous `beforeEach` function to the component meta.
You return a cleanup function from the `beforeEach` function, which will run **after** each story, when the story is remounted or navigated away from.
You don't need this if you reset the state to a default in the preview file,