diff --git a/test/inRange.test.js b/test/inRange.test.js index 9a93aa20f..c4bfa03c2 100644 --- a/test/inRange.test.js +++ b/test/inRange.test.js @@ -7,6 +7,9 @@ test('inRange is a Function', () => { test('The given number falls within the given range', () => { expect(inRange(3, 2, 5)).toBeTruthy(); }); +test('The given number falls within the given range (reverse)', () => { + expect(inRange(3, 5, 2)).toBeTruthy(); +}); test('The given number falls within the given range', () => { expect(inRange(3, 4)).toBeTruthy(); }); diff --git a/test/initialize2DArray.test.js b/test/initialize2DArray.test.js index d520752c5..41700908d 100644 --- a/test/initialize2DArray.test.js +++ b/test/initialize2DArray.test.js @@ -7,3 +7,6 @@ test('initialize2DArray is a Function', () => { test('Initializes a 2D array of given width and height and value', () => { expect(initialize2DArray(2, 2, 0)).toEqual([[0, 0], [0, 0]]); }); +test('Initializes a 2D array of given width and height and value (no fill)', () => { + expect(initialize2DArray(2, 2)).toEqual([[null, null], [null, null]]); +}); diff --git a/test/initializeArrayWithValues.test.js b/test/initializeArrayWithValues.test.js index d47e6f60c..c1f75cd0a 100644 --- a/test/initializeArrayWithValues.test.js +++ b/test/initializeArrayWithValues.test.js @@ -7,3 +7,6 @@ test('initializeArrayWithValues is a Function', () => { test('Initializes and fills an array with the specified values', () => { expect(initializeArrayWithValues(5, 2)).toEqual([2, 2, 2, 2, 2]); }); +test('Initializes and fills an array with the specified values (no fill)', () => { + expect(initializeArrayWithValues(5)).toEqual([0, 0, 0, 0, 0]); +}); diff --git a/test/isBrowser.test.js b/test/isBrowser.test.js index 359dfd8d8..ec513860f 100644 --- a/test/isBrowser.test.js +++ b/test/isBrowser.test.js @@ -4,3 +4,6 @@ const {isBrowser} = require('./_30s.js'); test('isBrowser is a Function', () => { expect(isBrowser).toBeInstanceOf(Function); }); +test('isBrowser is a Function', () => { + expect(typeof isBrowser()).toBe('boolean'); +});