mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-20 06:29:32 +02:00
testing the case step equal to 0
This commit is contained in:
@@ -53,4 +53,24 @@ describe('listOfIntegers function', () => {
|
|||||||
const result = listOfIntegers(initialValue, count, step, separator);
|
const result = listOfIntegers(initialValue, count, step, separator);
|
||||||
expect(result).toBe('-10 -7.5 -5 -2.5 0');
|
expect(result).toBe('-10 -7.5 -5 -2.5 0');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should generate a constant sequence if the step is 0', () => {
|
||||||
|
const initialValue = 1;
|
||||||
|
const step = 0;
|
||||||
|
const count = 5;
|
||||||
|
const separator = ' ';
|
||||||
|
|
||||||
|
const result = listOfIntegers(initialValue, count, step, separator);
|
||||||
|
expect(result).toBe('1 1 1 1 1');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should generate a constant sequence if the step is 0', () => {
|
||||||
|
const initialValue = 1;
|
||||||
|
const step = 0;
|
||||||
|
const count = 5;
|
||||||
|
const separator = ' ';
|
||||||
|
|
||||||
|
const result = listOfIntegers(initialValue, count, step, separator);
|
||||||
|
expect(result).toBe('1 1 1 1 1');
|
||||||
|
});
|
||||||
});
|
});
|
Reference in New Issue
Block a user