fix 'make check'

This commit is contained in:
Trent Mick 2015-01-17 22:04:39 -08:00
parent b9e3a0d3cb
commit 08a4bab1ba
2 changed files with 23 additions and 16 deletions

View file

@ -51,7 +51,7 @@ var isBrowser = function () {
return typeof (window) !== 'undefined' && this === window; }(); return typeof (window) !== 'undefined' && this === window; }();
try { try {
var sourceMapSupport = require("source-map-support"); var sourceMapSupport = require('source-map-support');
} catch (_) { } catch (_) {
sourceMapSupport = null; sourceMapSupport = null;
} }

View file

@ -75,9 +75,11 @@ test('stream & level="trace" specified', function (t) {
test('one stream, default level', function (t) { test('one stream, default level', function (t) {
var log = bunyan.createLogger({ var log = bunyan.createLogger({
name: 'foo', name: 'foo',
streams: [{ streams: [
{
stream: process.stderr stream: process.stderr
}] }
]
}); });
t.equal(log.level(), bunyan.INFO); t.equal(log.level(), bunyan.INFO);
t.equal(log.streams[0].level, bunyan.INFO); t.equal(log.streams[0].level, bunyan.INFO);
@ -88,9 +90,11 @@ test('one stream, top-"level" specified', function (t) {
var log = bunyan.createLogger({ var log = bunyan.createLogger({
name: 'foo', name: 'foo',
level: 'error', level: 'error',
streams: [{ streams: [
{
stream: process.stderr stream: process.stderr
}] }
]
}); });
t.equal(log.level(), bunyan.ERROR); t.equal(log.level(), bunyan.ERROR);
t.equal(log.streams[0].level, bunyan.ERROR); t.equal(log.streams[0].level, bunyan.ERROR);
@ -100,10 +104,12 @@ test('one stream, top-"level" specified', function (t) {
test('one stream, stream-"level" specified', function (t) { test('one stream, stream-"level" specified', function (t) {
var log = bunyan.createLogger({ var log = bunyan.createLogger({
name: 'foo', name: 'foo',
streams: [{ streams: [
{
stream: process.stderr, stream: process.stderr,
level: 'error' level: 'error'
}] }
]
}); });
t.equal(log.level(), bunyan.ERROR); t.equal(log.level(), bunyan.ERROR);
t.equal(log.streams[0].level, bunyan.ERROR); t.equal(log.streams[0].level, bunyan.ERROR);
@ -114,10 +120,12 @@ test('one stream, both-"level" specified', function (t) {
var log = bunyan.createLogger({ var log = bunyan.createLogger({
name: 'foo', name: 'foo',
level: 'debug', level: 'debug',
streams: [{ streams: [
{
stream: process.stderr, stream: process.stderr,
level: 'error' level: 'error'
}] }
]
}); });
t.equal(log.level(), bunyan.ERROR); t.equal(log.level(), bunyan.ERROR);
t.equal(log.streams[0].level, bunyan.ERROR); t.equal(log.streams[0].level, bunyan.ERROR);
@ -163,4 +171,3 @@ test('two streams, one with "level" specified', function (t) {
t.equal(log.streams[1].level, bunyan.FATAL); t.equal(log.streams[1].level, bunyan.FATAL);
t.end(); t.end();
}); });