diff --git a/test/squire.spec.js b/test/squire.spec.js index 6705f61..2d9869a 100644 --- a/test/squire.spec.js +++ b/test/squire.spec.js @@ -208,7 +208,13 @@ describe('Squire RTE', function () { }); it('returns the path to the selection', function () { - editor.insertHTML('Bold Text'); + var range = doc.createRange(); + range.setStart(doc.body.childNodes.item(0).childNodes.item(1), 0); + range.setEnd(doc.body.childNodes.item(0).childNodes.item(1), 0); + editor.setSelection(range); + + //Manually tell it to update the path + editor._updatePath(range); expect(editor.getPath(), 'to be', 'DIV>B'); });