commit 84bfb9f8f6c9b27ef7add513b50fa34adcfd6a38 parent 1fe47c20e74029f92f28b1443b7d1bb0bcf96268 Author: sambhav jain <sambhavjain9138@gmail.com> Date: Sat, 3 Oct 2020 00:21:14 +0530 added unit test function to check validURL function Diffstat:
| M | demo/src/test.js | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/demo/src/test.js b/demo/src/test.js @@ -165,6 +165,13 @@ describe('Regression Tests', () => { }); + it('should check if the input string is a valid URL', (done) => { + 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'); + done(); + }); + }); /* Internal Tests */