Test cleanup and fixes [c-d]

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

View File

@ -5,8 +5,16 @@ const inRange = require('./inRange.js');
test('inRange is a Function', () => {
expect(inRange).toBeInstanceOf(Function);
});
t.equal(inRange(3, 2, 5), true, "The given number falls within the given range");
t.equal(inRange(3, 4), true, "The given number falls within the given range");
t.equal(inRange(2, 3, 5), false, "The given number does not falls within the given range");
t.equal(inRange(3, 2), false, "The given number does not falls within the given range");
test('The given number falls within the given range', () => {
expect(inRange(3, 2, 5)).toBe(true)
});
test('The given number falls within the given range', () => {
expect(inRange(3, 4)).toBe(true)
});
test('The given number does not falls within the given range', () => {
expect(inRange(2, 3, 5)).toBe(false)
});
test('The given number does not falls within the given range', () => {
expect(inRange(3, 2)).toBe(false)
});