There was an error while loading. Please reload this page.
1 parent d5e41cc commit 461e024Copy full SHA for 461e024
2 files changed
test/index.test.js
@@ -1,2 +1,5 @@
1
require('./modules/utils.test');
2
+
3
4
require('./modules/emoticons/emoji.test');
5
+require('./modules/emoticons/smiley.test');
test/modules/emoticons/smiley.test.js
@@ -0,0 +1,20 @@
+var Smiley = require('../../../src/modules/emoticons/smiley.es6');
+var expect = require('chai').expect;
+var string = 'Hello :)';
6
+var smiley = new Smiley(string);
7
8
+describe('Smiley Unit Test', function(){
9
+ "use strict";
10
11
+ it('should return a string', function(){
12
+ expect(smiley.process()).to.be.a('string');
13
+ });
14
15
+ it('should insert a font smiley', function(){
16
+ expect(smiley.process()).to.equal(
17
+ `Hello <span class="icon-emoticon" title=":)"></span>`
18
+ )
19
20
+});
0 commit comments