title: How can I test a custom input Vue component
body: <p>In the Vue.js documentation, there is an example of a custom input component. I'm trying to figure out how I can write a unit test for a component like that. Usage of the component would look like this</p>
  <pre><code>&lt;currency-input v-model=&quot;price&quot;&gt;&lt;/currency-input&gt;
  </code></pre>
  <p>The full implementation can be found at <a href="https://v2.vuejs.org/v2/guide/components.html#Form-Input-Components-using-Custom-Events" rel="nofollow noreferrer">https://v2.vuejs.org/v2/guide/components.html#Form-Input-Components-using-Custom-Events</a></p>
  <p>The documentation says</p>
  <blockquote>
  <p>So for a component to work with <code>v-model</code>, it should (these can be configured in 2.2.0+):</p>
  <ul>
  <li>accept a value prop</li>
  <li>emit an input event with the new value</li>
  </ul>
  </blockquote>
  <p>How do I write a unit test that ensures that I've written this component such that it will work with <code>v-model</code>? Ideally, I don't want to specifically test for those two conditions, I want to test the behavior that when the value changes within the component, it also changes in the model.</p>