1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/packages/logger-prettify/test/index.spec.ts
Juan Picado @jotadeveloper 958a5d886f feat: migrate from buyan to pinojs (#1760)
* feat: migrate from buyan to pinojs

* chore: fix lint

* chore: release utils from import

* chore: fix test

* chore: add missing dep

* chore: add dependency

* chore: add prettifier module

* chore: add pretty stamp option

* chore: fix package name location

* chore: crash on try use rotating file type

* chore: remove arg
2021-04-09 17:54:09 +02:00

19 lines
468 B
TypeScript

import * as factory from '../src';
describe('prettyFactory', () => {
const prettyfierOptions = { messageKey: 'msg', levelFirst: true, prettyStamp: false };
test('should return a function', () => {
expect(typeof factory['default']({})).toEqual('function')
});
test('should return a function', () => {
const log = {
level: 10,
foo: 'foo',
msg: '[trace] - @{foo}'
};
expect(factory['default'](prettyfierOptions)(log)).toMatchSnapshot();
});
});