1 import mod from './mod';
3 describe('mod()', () => {
4 it('should return a positive remainder', () => {
5 expect(mod(-4, 3)).toEqual(2);
6 expect(mod(-3, 3)).toEqual(0);
7 expect(mod(-2, 3)).toEqual(1);
8 expect(mod(-1, 3)).toEqual(2);
9 expect(mod(0, 3)).toEqual(0);
10 expect(mod(1, 3)).toEqual(1);
11 expect(mod(2, 3)).toEqual(2);
12 expect(mod(3, 3)).toEqual(0);
13 expect(mod(4, 3)).toEqual(1);