How about adding a sub test by deleting the default ``p`` tag? So we know removing the default before typing a new one always works.
````
myDocument.replaceRange("", {line: 2, ch:9}, {line: 2, ch:10}); 
expect(myDocument.getLine(2)).toEqual("        <>Hello World</>"); 
````
Then you can adjust this line as 
````
myDocument.replaceRange("h1", {line: 2, ch:9}, {line: 2, ch:9}); 
````