0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/packages/logger-prettify/test/index.spec.ts
Juan Picado 15c694156a
fix eslint warnings (#2265)
* chore: reduce warnings

* chore: fix eslint warnings

* fix warning
2021-06-12 09:25:53 +02:00

18 lines
505 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 with options', () => {
const log = {
level: 10,
foo: 'foo',
msg: '[trace] - @{foo}',
};
expect(factory['default'](prettyfierOptions)(log)).toMatchSnapshot();
});
});