Skip to content

Commit 40ed6a8

Browse files
committed
minor bug fix in the test files
1 parent 7e4c169 commit 40ed6a8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/transport-tests.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var expect = require('chai').expect;
77
var rimraf = require('rimraf');
88
var moment = require('moment');
99
var winston = require('winston');
10-
// eslint-disable-next-line node/no-unpublished-require -- It's published, see: https://threads.js.org/
10+
// eslint-disable-next-line node/no-unpublished-require
1111
var { spawn, Thread, Worker } = require('threads');
1212
var { promisify } = require('util');
1313
var MemoryStream = require('./memory-stream');
@@ -22,7 +22,8 @@ function sendLogItem(transport, level, message, meta, cb) { // eslint-disable-li
2222
});
2323

2424
const info = { level: level, message: message };
25-
transport.log(winston.format.json().transform(info));
25+
const jsonFormat = winston.format.json();
26+
transport.log(jsonFormat.transform(info, jsonFormat.options));
2627
}
2728

2829
describe('winston/transports/daily-rotate-file', function () {
@@ -183,7 +184,7 @@ describe('winston/transports/daily-rotate-file', function () {
183184
opts.watchLog = true;
184185
this.transport = new DailyRotateFile(opts);
185186

186-
this.transport.on('addWatcher', (newFile) => {
187+
this.transport.on('addWatcher', (newFile) => {
187188
expect(newFile).to.equal(filename);
188189
done()
189190
});
@@ -236,7 +237,7 @@ describe('winston/transports/daily-rotate-file', function () {
236237
});
237238
this.transport.removeListener('finish', finishListener)
238239
}
239-
240+
240241
this.transport.on('finish', finishListener);
241242

242243
this.transport.close();

test/transport.worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const path = require('path');
2-
// eslint-disable-next-line node/no-unpublished-require -- It's published, see: https://threads.js.org/
2+
// eslint-disable-next-line node/no-unpublished-require
33
const { expose } = require("threads/worker");
44
const DailyRotateFile = require("../daily-rotate-file");
55

0 commit comments

Comments
 (0)