title: Setting up Vue computed properties for unit tests with vue-test-utils
body: <p>vue-test-utils provides a setComputed method that allows you to set the state of a computed property.</p>
  
  <pre><code>import { mount } from '@vue/test-utils'
  const wrapper = mount(Home)
  wrapper.setComputed({loaded: true})
  </code></pre>
  
  <p>vue-test-utils version 1.1.0.beta is throwing a deprecation warning for the setComputed method that reads <code>setComputed() has been deprecated and will be removed in version 1.0.0. You can overwrite computed properties by passing a computed object in the mounting options</code></p>
  
  <p>The <a href="https://vue-test-utils.vuejs.org/en/api/options.html" rel="noreferrer">mounting options in the docs</a> don't mention any computed object. I had a go at </p>
  
  <pre><code>const wrapper = mount(Home, { computed: {loaded: true} })
  </code></pre>
  
  <p>and </p>
  
  <pre><code>const wrapper = mount(Home, {context: { computed: {loaded: true} }  })
  </code></pre>
  
  <p>but those blew up. </p>
  
  <p>What's the way to set up a computed property for vue-test-utils?</p>