13 lines
357 B
TypeScript
13 lines
357 B
TypeScript
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
|
import * as smartformat from '../ts/index.js';
|
|
|
|
tap.test('should format bytes', async () => {
|
|
expect(smartformat.prettyBytes(1337)).toEqual('1.34 kB');
|
|
});
|
|
|
|
tap.test('should format milliseconds', async () => {
|
|
expect(smartformat.prettyMs(1337)).toEqual('1.3s');
|
|
});
|
|
|
|
export default tap.start();
|