1import { describe, expect, it } from '@jest/globals';
2import { format } from './index';
3
4// numbers
5
6describe('format(number, { long: true })', () => {
7 it('should not throw an error', () => {
8 expect(() => {
9 format(500, { long: true });
10 }).not.toThrow();
11 });
12 it('should support milliseconds', () => {
13 expect(format(500, { long: true })).toBe('500 ms');
14 expect(format(-500, { lng: true })).toBe('-500 ms');
15 });
function format(ms: number, options?: Options): string
Format the given integer as a string.