title: how can i test a computed property in vuejs using jest?
body: <p>im still new with unit testing and i want to test if the a linked button is displayed when the <code>isLinkPresent</code> computed property return the link of the image and is not empty of this component :</p>
  
  <pre><code>    &lt;template lang="pug"&gt;
      .merchandising_image_title
    .image(:style="`background-image: url('${imageTitle.image}');`" )
    .panel
      .top
        h2 {{imageTitle.top_title}}
        .line
      .center
        h1 {{imageTitle.center_title}}
      .bottom(v-if="isLinkPresent")
        a.btn.round( target='_blank' :href='imageTitle.link') Notify Me By Email
      &lt;/template&gt;
      &lt;script&gt;
      export default {
        name: 'MerchandisingImageTitle',
        props: {
          imageTitle: Object
        },
        computed:{
          isLinkPresent(){
            return this.imageTitle.link &amp;&amp; this.imageTitle.link !== ''
          }
        }
      }
      &lt;/script&gt;
  </code></pre>
  
  <p>i have tried to test it like this by overwriting the computed property :</p>
  
  <pre><code>    it("renders linked button when image title has a link and is not empty", () =&gt; {
    const wrapper = mount(ImageTitle, {
      propsData: {
        imageTitle: Object
      },
      computed: {
        isLinkPresent() {
          return this.imageTitle.link &amp;&amp; this.imageTitle.link !== "";
        }
      }
    });
    expect(wrapper.find("a").isVisible()).toBe(true);
  });
  </code></pre>
  
  <p>but it gave me this error:</p>
  
  <pre><code>[vue-test-utils]: find did not return a, cannot call isVisible() on empty Wrapper
  
    13 |     }
    14 |   });
  &gt; 15 |   expect(wrapper.find("a").isVisible()).toBe(true);
       |                            ^
    16 | });
  </code></pre>
  
  <p>im not sure what am i doing wrong, any help would be appreciated</p>
  
  <p>edit : okay so i realised i didnt pass the propsData correctly so i changed it to <code>propsData: { imageTitle: { imageTitleData: { image: "", top_title: "", center_title: "", link: ""}}}</code> and do <code>expect(wrapper.find(".bottom").exists()).toBe(true)</code> as that isVisible() is used mostly in v-show but still getting this error : `
      renders linked button when image title has a link and is not empty</p>
  
  <pre><code>    expect(received).toBe(expected) // Object.is equality
  
      Expected: true
      Received: false
  
        20 |     }
        21 |   });
      &gt; 22 |   expect(wrapper.find(".bottom").exists()).toBe(true);
           |                                            ^
        23 | });
        24 |`
  </code></pre>