floor-10.js 342 B

12345678910111213
  1. "use strict";
  2. var assert = require("chai").assert
  3. , floor10 = require("../../math/floor-10");
  4. describe("math/floor-10", function () {
  5. it("Should floor", function () {
  6. assert.equal(floor10(55.59, -1), 55.5);
  7. assert.equal(floor10(59, 1), 50);
  8. assert.equal(floor10(-55.51, -1), -55.6);
  9. assert.equal(floor10(-51, 1), -60);
  10. });
  11. });