Adding JS test for patch a document.