striven-editor

Maintained and contributed to an open source WYSIWYG editor as an internship project that made it to production and was adopted by the company I was working at.
git clone https://unitehenry.com/git/striven-editor.git
Log | Files | Refs | README | LICENSE

commit 665ee700eaa6ae20f939c86cc58858614353bb9e
parent ff6521439ebd39ec3fedb643bdf24edc9f13ec90
Author: RachelM <rachieb19@gmail.com>
Date:   Mon,  5 Oct 2020 10:49:13 -0400

added timeout

Diffstat:
Mdemo/src/test.js | 23++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/demo/src/test.js b/demo/src/test.js @@ -1,3 +1,4 @@ +/* eslint-disable */ const { assert } = chai; mocha.setup("bdd"); @@ -198,15 +199,19 @@ describe("Regression Tests", () => { it("should apply strikethrough decoration to content", (done) => { const se = getEditor(); se.setContent("<p>Strike Me Through</p>"); - se.getRange().selectNode(se.body.querySelector("p")); - se.toolbar.querySelector("#toolbar-strikethrough").click(); - se.body.onfocus(); - assert.exists( - se.body.querySelector("strike"), - "strikethrough was applied" - ); - se.clearContent(); - done(); + setTimeout(() => { + se.getRange().selectNode(se.body.querySelector("p")); + se.toolbar.querySelector("#toolbar-strikethrough").click(); + se.body.onfocus(); + setTimeout(() => { + assert.exists( + se.body.querySelector("strike"), + "strikethrough was applied" + ); + se.clearContent(); + done(); + }, 0); + }, 200); }); });