ensure-time-value.js 268 B

1234567891011121314
  1. "use strict";
  2. module.exports = function (t, a) {
  3. a(t(12), 12, "Number in range");
  4. a(t(12.23), 12, "Rounds number in range");
  5. a(t(-12.63), -12, "Rounds negative number in range");
  6. a.throws(
  7. function () {
  8. t(NaN);
  9. },
  10. TypeError,
  11. "Throws on invalid"
  12. );
  13. };