Testing input.focus() in Enzyme
<p>How do I test <code>input.focus()</code> in enzyme. I am writing the script with react. My code is below:</p>
<pre><code>public inputBox: any;

componentDidUpdate = () =&gt; {
    setTimeout(() =&gt; {
        this.inputBox.focus();
    }, 200);
}

render() {
    return (
        &lt;div&gt;
            &lt;input
                type = 'number'
                ref = {element =&gt; this.inputBox = element } /&gt;
        &lt;/div&gt;
    );
}
</code></pre>