Test cleanup and fixes [c-d]

This commit is contained in:
Angelos Chalaris
2018-06-18 16:34:04 +03:00
parent 026c65a5e6
commit eb3cb2f928
136 changed files with 805 additions and 484 deletions

View File

@ -5,7 +5,13 @@ const geometricProgression = require('./geometricProgression.js');
test('geometricProgression is a Function', () => {
expect(geometricProgression).toBeInstanceOf(Function);
});
t.deepEqual(geometricProgression(256), [1, 2, 4, 8, 16, 32, 64, 128, 256], "Initializes an array containing the numbers in the specified range");
t.deepEqual(geometricProgression(256, 3), [3, 6, 12, 24, 48, 96, 192], "Initializes an array containing the numbers in the specified range");
t.deepEqual(geometricProgression(256, 1, 4), [1, 4, 16, 64, 256], "Initializes an array containing the numbers in the specified range");
test('Initializes an array containing the numbers in the specified range', () => {
expect(geometricProgression(256), [1, 2, 4, 8, 16, 32, 64, 128).toEqual(256])
});
test('Initializes an array containing the numbers in the specified range', () => {
expect(geometricProgression(256, 3), [3, 6, 12, 24, 48, 96).toEqual(192])
});
test('Initializes an array containing the numbers in the specified range', () => {
expect(geometricProgression(256, 1, 4), [1, 4, 16, 64).toEqual(256])
});