From 45d234b1ca86adff04d8eb193ec8114dc9e5e1e3 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Fri, 10 Feb 2017 17:12:54 -0800 Subject: [PATCH 1/2] avoid printing to console during test --- packages/logging-winston/system-test/logging-winston.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/logging-winston/system-test/logging-winston.js b/packages/logging-winston/system-test/logging-winston.js index 17a8dce8e62..a0a13ba6190 100644 --- a/packages/logging-winston/system-test/logging-winston.js +++ b/packages/logging-winston/system-test/logging-winston.js @@ -29,7 +29,7 @@ var loggingWinston = require('../'); describe('LoggingWinston', function() { var WRITE_CONSISTENCY_DELAY_MS = 20000; - winston.add(loggingWinston, env); + var logger = new (winston.Logger)({transports: [new loggingWinston(env)]}); describe('log', function() { var testTimestamp = new Date(); @@ -69,7 +69,7 @@ describe('LoggingWinston', function() { it('should properly write log entries', function(done) { async.each(testData, function(test, callback) { - winston.info.apply(winston, test.args.concat(callback)); + logger.info.apply(logger, test.args.concat(callback)); }, function(err) { assert.ifError(err); From d4ce9fcd193eea57094dabaa56fc294b97e9eba4 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 13 Feb 2017 13:07:57 -0500 Subject: [PATCH 2/2] style --- packages/logging-winston/system-test/logging-winston.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/logging-winston/system-test/logging-winston.js b/packages/logging-winston/system-test/logging-winston.js index a0a13ba6190..4af50f2c750 100644 --- a/packages/logging-winston/system-test/logging-winston.js +++ b/packages/logging-winston/system-test/logging-winston.js @@ -24,12 +24,16 @@ var winston = require('winston'); var env = require('../../../system-test/env.js'); var logging = require('@google-cloud/logging')(env); -var loggingWinston = require('../'); +var LoggingWinston = require('../'); describe('LoggingWinston', function() { var WRITE_CONSISTENCY_DELAY_MS = 20000; - var logger = new (winston.Logger)({transports: [new loggingWinston(env)]}); + var logger = new winston.Logger({ + transports: [ + new LoggingWinston(env) + ] + }); describe('log', function() { var testTimestamp = new Date();