Files
30-seconds-of-code/test/inRange/inRange.test.js
Angelos Chalaris 4f7da1be9b Test migration to jest by hand
Apparently using regular expressions is way easier.
2018-06-18 15:15:56 +03:00

13 lines
518 B
JavaScript

const expect = require('expect');
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");