Sha256: d2da04763b1da1d50e40710959dae3c5b7608e8f49e976608e34c6b21e062ac9

Contents?: true

Size: 1.38 KB

Versions: 21

Compression:

Stored size: 1.38 KB

Contents

/*
 * exception-test.js: Tests for exception data gathering in winston.
 *
 * (C) 2010 Charlie Robbins
 * MIT LICENSE
 *
 */

var path = require('path'),
    vows = require('vows'),
    assert = require('assert'),
    winston = require('../lib/winston'),
    helpers = require('./helpers');

vows.describe('winston/exception').addBatch({
  "When using the winston exception module": {
    "the getProcessInfo() method": {
      topic: winston.exception.getProcessInfo(),
      "should respond with the appropriate data": function (info) {
        helpers.assertProcessInfo(info);
      }
    },
    "the getOsInfo() method": {
      topic: winston.exception.getOsInfo(),
      "should respond with the appropriate data": function (info) {
        helpers.assertOsInfo(info);
      }
    },
    "the getTrace() method": {
      topic: winston.exception.getTrace(new Error()),
      "should have the appropriate info": function (trace) {
        helpers.assertTrace(trace);
      }
    },
    "the getAllInfo() method": {
      topic: winston.exception.getAllInfo(new Error()),
      "should have the appropriate info": function (info) {
        assert.isObject(info);
        assert.isArray(info.stack);
        helpers.assertDateInfo(info.date);
        helpers.assertProcessInfo(info.process);
        helpers.assertOsInfo(info.os);
        helpers.assertTrace(info.trace);
      }
    }
  }
}).export(module);

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
ela-4.1.6 node_modules/winston/test/exception-test.js
ela-4.1.5 node_modules/winston/test/exception-test.js
ela-4.1.4 node_modules/winston/test/exception-test.js
ela-4.1.3 node_modules/winston/test/exception-test.js
ela-4.1.2 node_modules/winston/test/exception-test.js
ela-4.1.1 node_modules/winston/test/exception-test.js
ela-4.1.0 node_modules/winston/test/exception-test.js
ela-4.0.0 node_modules/winston/test/exception-test.js
ela-3.4.3 node_modules/winston/test/exception-test.js
ela-3.4.2 node_modules/winston/test/exception-test.js
ela-3.4.0 node_modules/winston/test/exception-test.js
ela-3.3.1 node_modules/winston/test/exception-test.js
ela-3.3.0 node_modules/winston/test/exception-test.js
ela-3.2.0 node_modules/winston/test/exception-test.js
ela-3.1.1 node_modules/winston/test/exception-test.js
ela-3.1.0 node_modules/winston/test/exception-test.js
ela-3.0.0 node_modules/winston/test/exception-test.js
ela-2.0.0 node_modules/winston/test/exception-test.js
ela-1.1.0 node_modules/winston/test/exception-test.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/winston/test/exception-test.js