JSFiddle - React, Tailwind, and code Playground
JavaScript
function assert(func, assertValue, testValue) {
const actualValue = func(assertValue);
const errorString = `Calculation is wrong, expected ${testValue}, but got ${actualValue}`;
console.assert(actualValue === testValue, errorString);
}
assert(calcBoilTime, 5, 5);
assert(calcBoilTime, 10, 10);
assert(calcBoilTime, 65, 45);
console.log('done working');