cocalc/src / smc-project / node_modules / cliff / node_modules / winston / test / transports / console-test.js
50675 views/*1* console-test.js: Tests for instances of the Console transport2*3* (C) 2010 Charlie Robbins4* MIT LICENSE5*6*/78var path = require('path'),9vows = require('vows'),10assert = require('assert'),11winston = require('../../lib/winston'),12helpers = require('../helpers');1314var npmTransport = new (winston.transports.Console)(),15syslogTransport = new (winston.transports.Console)({ levels: winston.config.syslog.levels });1617vows.describe('winston/transports/console').addBatch({18"An instance of the Console Transport": {19"with npm levels": {20"should have the proper methods defined": function () {21helpers.assertConsole(npmTransport);22},23"the log() method": helpers.testNpmLevels(npmTransport, "should respond with true", function (ign, err, logged) {24assert.isNull(err);25assert.isTrue(logged);26})27},28"with syslog levels": {29"should have the proper methods defined": function () {30helpers.assertConsole(syslogTransport);31},32"the log() method": helpers.testSyslogLevels(syslogTransport, "should respond with true", function (ign, err, logged) {33assert.isNull(err);34assert.isTrue(logged);35})36}37}38}).export(module);3940