title: How can `document.execCommand` be unit tested?
body: <p>I'm trying to write unit tests for word-processor-like operations such as applying a list to a text node, but I found that <code>document.execCommand</code> is not available to <code>jsdom</code>, so I'm stumped as to how I could unit test the following operation:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>document.getElementById('run').addEventListener('click', function() {
    document.execCommand("insertorderedlist");
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div contenteditable="true"&gt;Foo&lt;/div&gt;
  &lt;button id="run"&gt;Select "Foo" then Click&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>