Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
maddumajohnerick committed Mar 23, 2017
1 parent 5e9727b commit c4ea242
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,31 @@ function check( done, f ) {
}
};

describe("cheers-alert notification", function() {
describe("emote-icons emoticons", function() {
beforeEach(function() {
global.$ = $;
});
afterEach(function() {
$('body').empty();
});

// it("should check if alert-container exist", function() {
// expect($('.alert-container').length).to.equal(0);
// });
it("should check text", function() {
var output = emotes('hi');

expect(output).to.equal('hi');
});

it("should parse if emoticons match", function() {
var output = emotes(':)');

expect(output).to.equal('<span class="sprite sprite-smile"></span>');
});

it("should check both", function() {
var output = emotes('hello :)');

expect(output).to.equal('hello <span class="sprite sprite-smile"></span>');
});
//
// it("create alert-container if none exist", function() {
// cheers.success({
Expand Down

0 comments on commit c4ea242

Please sign in to comment.