There was an error while loading. Please reload this page.
1 parent 76e8173 commit 62d64e5Copy full SHA for 62d64e5
2 files changed
test/index.test.js
@@ -3,3 +3,5 @@ require('./modules/utils.test');
3
4
require('./modules/emoticons/emoji.test');
5
require('./modules/emoticons/smiley.test');
6
+
7
+require('./modules/url.test.js');
test/modules/url.test.js
@@ -0,0 +1,18 @@
1
+const Url = require('../../src/modules/url.es6');
2
+const expect = require('chai').expect;
+const options = {
+ linkExclude : [],
+ linkTarget : '_blank'
8
+};
9
+const string = new Url('The url is http://rkritesh.in', options);
10
11
+describe('Replace url by anchor tags', function(){
12
+ "use strict";
13
+ it('should return a valid anchor tag by replacing the link', function(){
14
+ expect(string.process()).to.equal(
15
+ `The url is <a href="http://rkritesh.in" target="_blank">http://rkritesh.in</a>`
16
+ )
17
+ });
18
+});
0 commit comments