Files
30-seconds-of-code/test/clampNumber/clampNumber.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

10 lines
302 B
JavaScript

const expect = require('expect');
const clampNumber = require('./clampNumber.js');
test('clampNumber is a Function', () => {
expect(clampNumber).toBeInstanceOf(Function);
});
t.equal(clampNumber(2, 3, 5), 3, "Clamps num within the inclusive range specified by the boundary values a and b");