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 3e44b577b68e8fc76efa928638d468be7068cb74
parent 3f9560afb9622f316bef5a666ed16c3c472f8876
Author: Henry Unite <unitehenry@gmail.com>
Date:   Mon,  5 Oct 2020 08:57:48 -0400

valid url unit test

Diffstat:
Mdemo/src/test.js | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/demo/src/test.js b/demo/src/test.js @@ -213,6 +213,8 @@ describe('Regression Tests', () => { } }, 250); }); + + }); /* Internal Tests */ @@ -258,6 +260,12 @@ describe('Unit Tests', () => { assert.isEmpty(testArray, "inline styles are pruned"); se.clearContent(); }); + + it('should check if the input string is a valid URL', () => { + const se = getEditor(); + assert.isTrue(se.validURL('https://www.google.com'),'The string is a valid link'); + assert.isFalse(se.validURL('invalid.string'),'The string is an invalid link'); + }); }); mocha.run();