Name: js-handler/node_modules/restify/node_modules/bunyan/test/other-api.test.js 
1:
/*
2:
 * Copyright (c) 2012 Trent Mick. All rights reserved.
3:
 *
4:
 * Test other parts of the exported API.
5:
 */
6:
 
7:
var bunyan = require('../lib/bunyan');
8:
 
9:
// node-tap API
10:
if (require.cache[__dirname + '/tap4nodeunit.js'])
11:
        delete require.cache[__dirname + '/tap4nodeunit.js'];
12:
var tap4nodeunit = require('./tap4nodeunit.js');
13:
var after = tap4nodeunit.after;
14:
var before = tap4nodeunit.before;
15:
var test = tap4nodeunit.test;
16:
 
17:
 
18:
test('bunyan.<LEVEL>s', function (t) {
19:
    t.ok(bunyan.TRACE, 'TRACE');
20:
    t.ok(bunyan.DEBUG, 'DEBUG');
21:
    t.ok(bunyan.INFO, 'INFO');
22:
    t.ok(bunyan.WARN, 'WARN');
23:
    t.ok(bunyan.ERROR, 'ERROR');
24:
    t.ok(bunyan.FATAL, 'FATAL');
25:
    t.end();
26:
});
27:
 
28:
test('bunyan.resolveLevel()', function (t) {
29:
    t.equal(bunyan.resolveLevel('trace'), bunyan.TRACE, 'TRACE');
30:
    t.equal(bunyan.resolveLevel('TRACE'), bunyan.TRACE, 'TRACE');
31:
    t.equal(bunyan.resolveLevel('debug'), bunyan.DEBUG, 'DEBUG');
32:
    t.equal(bunyan.resolveLevel('DEBUG'), bunyan.DEBUG, 'DEBUG');
33:
    t.equal(bunyan.resolveLevel('info'), bunyan.INFO, 'INFO');
34:
    t.equal(bunyan.resolveLevel('INFO'), bunyan.INFO, 'INFO');
35:
    t.equal(bunyan.resolveLevel('warn'), bunyan.WARN, 'WARN');
36:
    t.equal(bunyan.resolveLevel('WARN'), bunyan.WARN, 'WARN');
37:
    t.equal(bunyan.resolveLevel('error'), bunyan.ERROR, 'ERROR');
38:
    t.equal(bunyan.resolveLevel('ERROR'), bunyan.ERROR, 'ERROR');
39:
    t.equal(bunyan.resolveLevel('fatal'), bunyan.FATAL, 'FATAL');
40:
    t.equal(bunyan.resolveLevel('FATAL'), bunyan.FATAL, 'FATAL');
41:
    t.end();
42:
});