title: How to mock useRoute() in vue testing library
body: <p>I ran into a problem when running a component test that has a line inside it:
  <code>const route = useRoute()</code>. I get an error: <code>Cannot read properties of undefined (reading 'path')</code>. Here is the test:</p>
  <pre><code>describe('Tariff card', () =&gt; {
    const options = {
      props: {
        name: 'test',
        tariffId: 2,
        price: 3990,
        maxCompanies: 1,
        maxCampaigns: 5,
        tariffNum: 2,
        isFree: false,
        duration: 30,
      },
      global: {
        plugins: [createTestingPinia()],
      },
    }
  
    it('render tariff card', async () =&gt; {
  
      jest.mock('vue-router', () =&gt; ({
        useRoute: jest.fn(() =&gt; ({ path: '/' }))
      }))
  
      render(TariffCard, options)
    })
  })
  </code></pre>