Skip to content

Commit

Permalink
Added check for modulo on prompt 4
Browse files Browse the repository at this point in the history
Added test to prompt 4 isEven that modulo isn't used.
  • Loading branch information
mybrainishuge committed Mar 20, 2016
1 parent 12de2f4 commit 119fe6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/part1.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@
expect(typeof(isEven(-4))).to.equal('boolean');
});

it("should not use modulo", function() {
expect(isEven.toString()).to.not.contain('%');
});

it('should return true for even numbers', function() {
expect(isEven(118)).to.equal(true);
expect(isEven(10)).to.equal(true);
Expand Down

0 comments on commit 119fe6b

Please sign in to comment.