title: Invariant Violation: You should not use <Switch> outside a <Router>
body: <p>I have a problem that I don't know how to solve, I get this error when running npm test</p>
  
  <blockquote>
    <p>Invariant Violation: You should not use <code>&lt;Switch&gt;</code> outside a <code>&lt;Router&gt;</code></p>
  </blockquote>
  
  <p>What can the problem be and how can I solve it? The test I run is the standard app.test.js that comes with react</p>
  
  <pre><code>class App extends Component {
    render() {
      return (
        &lt;div className = 'app'&gt;
          &lt;nav&gt;
            &lt;ul&gt;
              &lt;li&gt;&lt;Link exact activeClassName="current" to='/'&gt;Home&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link exact activeClassName="current" to='/TicTacToe'&gt;TicTacToe&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link exact activeClassName="current" to='/NumGame'&gt;Quick Maths&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link exact activeClassName="current" to='/HighScore'&gt;Highscore&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link exact activeClassName="current" to='/Profile'&gt;Profile&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link exact activeClassName="current" to='/Login'&gt;Sign out&lt;/Link&gt;&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/nav&gt;
          &lt;Switch&gt;
            &lt;Route exact path='/' component={Home}&gt;&lt;/Route&gt;
            &lt;Route path='/TicTacToe' component={TicTacToe}&gt;&lt;/Route&gt;
            &lt;Route path='/NumGame' component={NumberGame}&gt;&lt;/Route&gt;
            &lt;Route path='/HighScore' component={HighScore}&gt;&lt;/Route&gt;
            &lt;Route path='/Profile' component={Profile}&gt;&lt;/Route&gt;
            &lt;Route path='/Login' component={SignOut1}&gt;&lt;/Route&gt;
          &lt;/Switch&gt;
        &lt;/div&gt;
      );
    }
  };
  </code></pre>