Skip to content

Commit 19a851e

Browse files
updating to isIntegers in isIntegers spec
1 parent b89ba25 commit 19a851e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

spec/isIntegers.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@ const { isIntegers } = require('../lib/isIntegers');
22

33
describe('isIntegers', () => {
44
it('should throw an error if no parameters are provided', () => {
5-
expect(() => isInteger()).toThrow();
5+
expect(() => isIntegers()).toThrow();
66
});
77

88
it('should throw an error if any parameters provided are not numbers', () => {
9-
expect(() => isInteger('')).toThrow();
10-
expect(() => isInteger('test', 2)).toThrow();
9+
expect(() => isIntegers('')).toThrow();
10+
expect(() => isIntegers('test', 2)).toThrow();
1111
});
1212

1313
it('should return false if any parameters are not an integer', () => {
14-
expect(isInteger(2.5)).toBe(false);
15-
expect(isInteger(2, 2.5)).toBe(false);
14+
expect(isIntegers(2.5)).toBe(false);
15+
expect(isIntegers(2, 2.5)).toBe(false);
1616
});
1717

1818
it('should return true if all parameters are integers', () => {
19-
expect(isInteger(0)).toBe(true);
20-
expect(isInteger(2)).toBe(true);
21-
expect(isInteger(-1)).toBe(true);
22-
expect(isInteger(-1, 0, 2)).toBe(true);
19+
expect(isIntegers(0)).toBe(true);
20+
expect(isIntegers(2)).toBe(true);
21+
expect(isIntegers(-1)).toBe(true);
22+
expect(isIntegers(-1, 0, 2)).toBe(true);
2323
});
2424

2525
it('should return true if all parameters can parse to integer', () => {
26-
expect(isInteger('0')).toBe(true);
27-
expect(isInteger('2')).toBe(true);
28-
expect(isInteger('-1')).toBe(true);
29-
expect(isInteger('-1', '0', '2')).toBe(true);
30-
expect(isInteger('-1', 0, '2')).toBe(true);
26+
expect(isIntegers('0')).toBe(true);
27+
expect(isIntegers('2')).toBe(true);
28+
expect(isIntegers('-1')).toBe(true);
29+
expect(isIntegers('-1', '0', '2')).toBe(true);
30+
expect(isIntegers('-1', 0, '2')).toBe(true);
3131
});
3232
});

0 commit comments

Comments
 (0)