title: How to test Vue watcher that watches a computed property from VueX?
body: <p>Suppose I have the following component:</p>
  
  <pre><code>import { mapState } from 'vuex';
  import externalDependency from '...';
  
  export default {
    name: 'Foo',
    computed: {
      ...mapState(['bar'])
    },
    watch: {
      bar () {
       externalDependency.doThing(this.bar);
      }
    }
  }
  </code></pre>
  
  <p>When testing, I want to ensure that <code>externalDependency.doThing()</code> is called with <code>bar</code> (which comes from the vuex state) like so:</p>
  
  <pre><code>it('should call externalDependency.doThing with bar', () =&gt; {
    const wrapper = mount(Foo);
    const spy = jest.spyOn(externalDependency, 'doThing');
  
    wrapper.setComputed({bar: 'baz'});
  
    expect(spy).toHaveBeenCalledWith('baz');
  });
  </code></pre>
  
  <p>Vue test-utils has a setComputed method which allows me to currently test it, but I keep getting warnings that setComputed will be removed soon, and I don't know how else this can be tested:</p>
  
  <p><a href="https://github.com/vuejs/vue-test-utils/issues/331" rel="noreferrer">https://github.com/vuejs/vue-test-utils/issues/331</a></p>