2
0

s-number.js 497 B

1234567891011121314
  1. describe('Number', function () {
  2. 'use strict';
  3. describe('toFixed', function () {
  4. it('should convert numbers correctly', function () {
  5. expect((0.00008).toFixed(3)).toBe('0.000');
  6. expect((0.9).toFixed(0)).toBe('1');
  7. expect((1.255).toFixed(2)).toBe('1.25');
  8. expect((1843654265.0774949).toFixed(5)).toBe('1843654265.07749');
  9. expect((1000000000000000128).toFixed(0)).toBe('1000000000000000128');
  10. });
  11. });
  12. });