title: How can I trigger the 'blur' event while testing a vuejs component?
body: <p>I'm writing test on a vue component that must call a method when focus is lost.</p>
  
  <p>According to vue-test-utils I should use <code>wrapper.trigger('blur')</code>. But the method is not fired.
  I suspect that <code>blur</code> isn't the proper event name, since it appears as <code>focusout</code> in the console. But changing the name doesn't solve the problem.</p>
  
  <p>Component:</p>
  
  <pre><code>&lt;template&gt;
      &lt;input @blur="foo" /&gt;
  &lt;/template&gt;
  ...
  </code></pre>
  
  <p>Test file:</p>
  
  <pre><code>import { mount } from 'vue-test-utils'
  import MyComponent from '../MyComponent'
  
  describe('myComponent', () =&gt; {
      const mockFn = jest.fn()
      const wrapper = mount(MyComponent, { mocks: { foo: mockFn } })
      it('fires "foo" on blur', () =&gt; {
          wrapper.trigger('blur')
          expect(mockFn).toHaveBeenCalled()
      }
  </code></pre>
  
  <p>I expected that using <code>wrapper.trigger('blur')</code> would fire <code>foo</code>, which is mocked with <code>mockFn</code>. But <code>mockFn</code> is never called.</p>