We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e483146 + 0dae049 commit bc0ac3fCopy full SHA for bc0ac3f
tests/helper.spec.js
@@ -0,0 +1,21 @@
1
+const { isURL } = require('../lib/helper')
2
+
3
+const expect = require('chai').expect;
4
5
+describe('helper', ()=> {
6
7
+ it('isURL()', () => {
8
+ // Links
9
+ expect(isURL("https://www.google.com")).to.be.true
10
+ expect(isURL("https://www.data.gov.in")).to.be.true
11
+ expect(isURL("http://facebook.com")).to.be.true
12
+ expect(isURL("http://github.com")).to.be.true
13
14
+ // Not Links
15
+ expect(isURL("helloworld")).to.be.false
16
+ expect(isURL("htts://www.google.com")).to.be.false
17
+ expect(isURL("hats://facebook")).to.be.false
18
+ expect(isURL("blablabla.com")).to.be.false
19
+ });
20
21
+})
0 commit comments