Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
terminal-cv/node_modules/@parcel/utils/test/prettifyTime.test.js

17 lines
559 B

// @flow
import assert from 'assert';
import prettifyTime from '../src/prettifyTime';
describe('prettifyTime', () => {
it('should format numbers less than 1000 as ms', () => {
assert.equal(prettifyTime(888), '888ms');
assert.equal(prettifyTime(50), '50ms');
assert.equal(prettifyTime(0), '0ms');
});
it('should format numbers greater than 1000 as s with 2 fractional digits', () => {
assert.equal(prettifyTime(4000), '4.00s');
assert.equal(prettifyTime(90000), '90.00s');
assert.equal(prettifyTime(45678), '45.68s');
});
});