title: How to change $route in jest test case +VueJS +Jest
body: <p>I am newbie to VueJS (and in test cases as well), apologize if this is already asked question, </p>
  
  <p>I added a method in my component which checks the <code>$route.name</code> and returns a boolean accordingly, </p>
  
  <p>BUT the issue appears in the test cases (JEST)
  Have tried it with this but not working</p>
  
  <p><code>isAbc () {</code>
  <code>return this.$route.name === 'abc-route</code>
  <code>}</code></p>
  
  <p>This is my method for which I want to write test case,</p>
  
  <pre><code>const $route = {
    name: 'abc-route'
  }
  
  const wrapper = shallowMount(Component, {
    mocks: {
      $route
    }
  })
  </code></pre>
  
  <p>I have also tried this approach
  <a href="https://github.com/facebook/jest/issues/890#issuecomment-209698782" rel="nofollow noreferrer">https://github.com/facebook/jest/issues/890#issuecomment-209698782</a>
  and checked if I can get <code>this.$route.path</code> but no luck with that as well.</p>
  
  <p>Anyone can please mention what am I missing or doing wrong to get this?</p>