Files
30-seconds-of-code/test/clampNumber.test.js
2018-10-19 20:18:00 +03:00

10 lines
312 B
JavaScript

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