@infotorg/winston-log-formats
Version:
Infotorg log formats for Winston logger
16 lines (11 loc) • 465 B
JavaScript
const formats = require('../src/main');
describe('Test formats exports', () => {
const exportedFormats = Object.keys(formats);
test.each(exportedFormats)('format "%s" should be a Function', (format) => {
expect(typeof formats[format]).toBe('function');
});
test('it should export all formats', () => {
const expectedFormats = ['axios', 'description', 'filter', 'mask', 'trackId'];
expect(exportedFormats).toEqual(expectedFormats);
});
});