Skip to content

Commit

Permalink
logging-winston: avoid printing to console during test (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofrobots authored and stephenplusplus committed Feb 13, 2017
1 parent 1a31783 commit b27d9b3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/logging-winston/system-test/logging-winston.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

winston.add(loggingWinston, env);
var logger = new winston.Logger({
transports: [
new LoggingWinston(env)
]
});

describe('log', function() {
var testTimestamp = new Date();
Expand Down Expand Up @@ -69,7 +73,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);

Expand Down

0 comments on commit b27d9b3

Please sign in to comment.