1
0
mirror of https://github.com/comatory/fb2iCal synced 2025-06-05 22:09:25 +02:00

fix invalid function signature for event data extraction

Additionally fix specs
This commit is contained in:
Ondřej Synáček
2020-07-17 23:11:07 +02:00
parent f14a57aa22
commit a661e54524
5 changed files with 97 additions and 45 deletions

25
test/log-utils.spec.js Normal file
View File

@ -0,0 +1,25 @@
const { expect } = require('chai')
const winston = require('winston')
const logUtils = require('../lib/log-utils')
describe('logUtils', () => {
it('should create console transport for logging in dev mode', () => {
expect(logUtils.createTransports(true)[0])
.to.be.instanceOf(winston.transports.Console)
})
it('should NOT create console transport for logging in undefined mode', () => {
const transports = logUtils.createTransports()
expect(transports).to.have.length(1)
expect(transports[0]).to.be.instanceOf(winston.transports.DailyRotateFile)
})
it('should create log rotate transport for logging in dev mode', () => {
expect(logUtils.createTransports(true)[1])
.to.be.instanceOf(winston.transports.DailyRotateFile)
})
})