While working on the Vitest - React Testing Library course, on the Setting Up Mock Service Worker section, I got an error from Vitest that states “TypeError: Failed to parse URL from /categories”. I’ve read it’s an issue with the URL being relative and not absolute, but I don’t understand what I should change it to since it’s a testing environment and it seems to work fine for Mosh in the video.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Vitest: TypeError: response.body.getReader is not a function | 0 | 167 | July 4, 2024 | |
Vitest unable to find role "option" | 0 | 145 | May 20, 2024 | |
React testing library can't find 'heading' | 3 | 601 | April 30, 2024 | |
10- Expected vs Unexpected Errors | 5 | 393 | April 6, 2021 | |
React Intermediate course, Detail page | 2 | 136 | June 2, 2024 |