mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-13 22:48:31 -05:00
477f9bcba4
* chore: migrate proxy package * chore: migrate logger-prettier
19 lines
540 B
TypeScript
19 lines
540 B
TypeScript
import { describe, expect, test } from 'vitest';
|
|
|
|
import { formatLoggingDate, padRight } from '../src/utils';
|
|
|
|
describe('formatLoggingDate', () => {
|
|
test('basic', () => {
|
|
expect(formatLoggingDate(1585411248203, 'message')).toEqual('[2020-03-28 16:00:48] message');
|
|
});
|
|
});
|
|
|
|
describe('pad', () => {
|
|
test('pad right with custom length', () => {
|
|
expect(padRight('message right', 20)).toEqual('message right ');
|
|
});
|
|
|
|
test('pad right 2', () => {
|
|
expect(padRight('message right')).toEqual('message right ');
|
|
});
|
|
});
|