Skip to content

Commit

Permalink
Modify describe modulo
Browse files Browse the repository at this point in the history
Added two tests to check against edge cases that were incorrectly
passing. Specifically, with a negative 'x' and positive 'y' where the
absolute of 'x' is larger than 'y'. And with two negative inputs where
'x' is less than 'y'.
  • Loading branch information
jabacchetta committed Mar 31, 2016
1 parent 6f42e7f commit a199baa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/part1.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
expect(modulo(78, 453)).to.equal(78 % 453);
expect(modulo(-79, 82)).to.equal(-79 % 82);
expect(modulo(-275, -502)).to.equal(-275 % -502);
expect(modulo(-275, -274)).to.equal(-275 % -274);
expect(modulo(-4, 2)).to.equal(-4 % 2);
expect(modulo(0, 32)).to.equal(0 % 32);
expect(modulo(0, 0).toString()).to.equal('NaN');
});
Expand Down

0 comments on commit a199baa

Please sign in to comment.