Test cleanup and fixes [g-h]
This commit is contained in:
@ -1,17 +1,15 @@
|
||||
const expect = require('expect');
|
||||
const geometricProgression = require('./geometricProgression.js');
|
||||
|
||||
|
||||
test('geometricProgression is a Function', () => {
|
||||
test('geometricProgression is a Function', () => {
|
||||
expect(geometricProgression).toBeInstanceOf(Function);
|
||||
});
|
||||
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)).toEqual([1, 2, 4, 8, 16, 32, 64, 128, 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, 3)).toEqual([3, 6, 12, 24, 48, 96, 192])
|
||||
});
|
||||
test('Initializes an array containing the numbers in the specified range', () => {
|
||||
expect(geometricProgression(256, 1, 4), [1, 4, 16, 64).toEqual(256])
|
||||
test('Initializes an array containing the numbers in the specified range', () => {
|
||||
expect(geometricProgression(256, 1, 4)).toEqual([1, 4, 16, 64, 256])
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user