Skip to content

Commit 2f90ea9

Browse files
committed
Markup fixes for last blog post and included error message
1 parent ab5f6b4 commit 2f90ea9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

testing-a-react-application-integrating-msw-with-vitest.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ afterAll(() => server.close());
129129
afterEach(() => server.resetHandlers());
130130
```
131131

132-
Now we're all set up and ready to test! Let's implement this in our **Vitest ** test.
132+
Now we're all set up and ready to test! Let's implement this in our **Vitest** test.
133133

134134
### Mocking our API request in Vitest
135135

@@ -186,13 +186,19 @@ I downgraded it to 13.5.0 and called the click event directly from `userEvent`.
186186

187187
You can find the entire project in this [repository with the updated list of dependencies](https://github.com/diballesteros/react-testing).
188188

189+
Error message for those googling:
190+
191+
```bash
192+
Error: The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.
193+
```
194+
189195
### Wrapping it up
190196

191197
We now have a powerful tool at our disposal to mock requests as we continue to create unit tests! In the next article, we'll go over how to set up Cypress.io.
192198

193199
More content at [Relatable Code](https://relatablecode.com)
194200

195-
## Let's connect
201+
### Let's connect
196202

197203
If you liked this feel free to connect with me on [LinkedIn](https://www.linkedin.com/in/relatablecode) or [Twitter](https://twitter.com/relatablecoder)
198204

0 commit comments

Comments
 (0)