title: Jest Vuejs Test - TypeError: Cannot read properties of undefined (reading 'params')
body: <p>I started first time to test my vuejs application. In my application I have a list of clients, and when you click on client, you go to that clients page, which I am try to test right now. But my test fails before I started with this error:</p>
  <pre><code>TypeError: Cannot read properties of undefined (reading 'params')
  
  created() {
     this.clientid = this.$route.params.id;
                                     ^
     this.getClient();
  }
  </code></pre>
  <p>I tried to set this into my test:</p>
  <pre><code>describe('Client', () =&gt; {
      it('should mount Client', () =&gt; {
        const wrapper = mount(Client, {
          data: () =&gt; ({
            route: {
              params: {
                id: ''
              }
            },
          }),
        });
        expect(wrapper.exists()).toBe(true);
      });
    });
  </code></pre>
  <p>Can you help me understand how to give this params a value through the test?</p>