UNPKG

@aller/blink

Version:

A library for tracking user behaviour.

18 lines 640 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var round_1 = require("../round"); describe('round', function () { it('should round to two decimals', function () { expect(round_1.round(25.888, 2)).toBe(25.89); }); it('should default to zero decimals', function () { expect(round_1.round(12)).toBe(12); }); it('should round int to float', function () { expect(round_1.round(150, 3)).toBe(150.0); }); it('should round down when that makes sense', function () { expect(round_1.round(1.12, 1)).toBe(1.1); }); }); //# sourceMappingURL=round.test.js.map