Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Add a test for generateNewGlyph in tooltip.js
Browse files Browse the repository at this point in the history
Test to see if generateNewGlyph successfully adds glyph_cells and
glyph_color to local storage, and that glyph_cells has 15 items.
  • Loading branch information
d356 committed Mar 5, 2015
1 parent f73e3f8 commit a9c7358
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions shared/test/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,13 @@ describe ("Tooltip Test Suite", function() {
expect(true).toBe(true);
});

it("can generate a new glyph", function() {
privlyTooltip.generateNewGlyph();
var glyphString = ls.getItem("glyph_cells");
expect(glyphString).toBeDefined();
expect(ls.getItem("glyph_color")).toBeDefined();
var glyphArray = glyphString.split(",");
expect(glyphArray.length).toBe(15);
});

});

0 comments on commit a9c7358

Please sign in to comment.