Skip to content

Commit

Permalink
Adding tests for issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Apr 11, 2017
1 parent b3dabf3 commit 41f3d8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/lru.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ exports.suite = {
test.done();
},
realistic: function (test) {
test.expect(7);
test.expect(9);
test.equal(this.cache.set("1", "a").length, 1, "Should be '1'");
test.equal(this.cache.set("2", "b").length, 2, "Should be '2'");
test.equal(this.cache.set("1", "c").length, 2, "Should be '2'");
test.equal(this.cache.cache["2"].next, "1", "Should be '1'");
test.equal(this.cache.cache["2"].previous, null, "Should be 'null'");
this.cache.delete(1);
test.equal(this.cache.length, 1, "Should be '1'");
test.equal(this.cache.first, "2", "Should be '2'");
Expand Down

0 comments on commit 41f3d8f

Please sign in to comment.