Test files linted

This commit is contained in:
Angelos Chalaris
2018-08-03 10:39:26 +03:00
parent 4cd1c56387
commit 4f1e8b48b6
153 changed files with 754 additions and 463 deletions

View File

@ -6,13 +6,13 @@ test('randomIntArrayInRange is a Function', () => {
});
const lowerLimit = Math.floor(Math.random() * 20);
const upperLimit = Math.floor(lowerLimit + Math.random() * 10);
const arr = randomIntArrayInRange(lowerLimit,upperLimit, 10);
const arr = randomIntArrayInRange(lowerLimit, upperLimit, 10);
test('The returned array contains only integers', () => {
expect(arr.every(x => typeof x === 'number')).toBeTruthy();
});
test('The returned array has the proper length', () => {
expect(arr.length).toBe(10);
});
test('The returned array\'s values lie between provided lowerLimit and upperLimit (both inclusive).', () => {
expect(arr.every(x => (x >= lowerLimit) && (x <= upperLimit))).toBeTruthy();
test("The returned array's values lie between provided lowerLimit and upperLimit (both inclusive).", () => {
expect(arr.every(x => x >= lowerLimit && x <= upperLimit)).toBeTruthy();
});