Create mapNumRange.test.js

This commit is contained in:
Yusof Bandar
2019-02-22 23:20:35 +00:00
committed by GitHub
parent 56d4b4ddca
commit fc3eb5d953

9
mapNumRange.test.js Normal file
View File

@ -0,0 +1,9 @@
const expect = require('expect');
const {mapNumRange} = require('./_30s.js');
test('mapNumRange is a Function', () => {
expect(mapNumRange).toBeInstanceOf(Function);
});
test('Maps 5 to the range 0-100 from 0-10', () => {
expect(distance(5,0,10,0,100)).toEqual(50);
});