-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm test failing on initial install #10
Comments
I fixed this by surrounding the switch in in App.js with BrowserRouter, as described in stackoverflow
|
you can watch the solution of this error in video #8 - Assertions. |
This seems to be a very good video.
I installed the repo and
npm test
failed:Invariant failed: You should not use <Switch> outside a <Router>
Here's the steps:
➜ git clone https://github.com/harblaith7/React-Testing-Library-Net-Ninja.git
➜ React-Testing-Library-Net-Ninja git:(main) npm install
➜ React-Testing-Library-Net-Ninja git:(main) npm start
➜ React-Testing-Library-Net-Ninja git:(main) git checkout 01-Starter-Project
➜ React-Testing-Library-Net-Ninja git:(main) npm test
The text was updated successfully, but these errors were encountered: