cocalc/src / smc-project / node_modules / broadway / node_modules / winston / test / exception-test.js
50659 views/*1* exception-test.js: Tests for exception data gathering in winston.2*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');1314vows.describe('winston/exception').addBatch({15"When using the winston exception module": {16"the getProcessInfo() method": {17topic: winston.exception.getProcessInfo(),18"should respond with the appropriate data": function (info) {19helpers.assertProcessInfo(info);20}21},22"the getOsInfo() method": {23topic: winston.exception.getOsInfo(),24"should respond with the appropriate data": function (info) {25helpers.assertOsInfo(info);26}27},28"the getTrace() method": {29topic: winston.exception.getTrace(new Error()),30"should have the appropriate info": function (trace) {31helpers.assertTrace(trace);32}33},34"the getAllInfo() method": {35topic: winston.exception.getAllInfo(new Error()),36"should have the appropriate info": function (info) {37assert.isObject(info);38assert.isArray(info.stack);39helpers.assertDateInfo(info.date);40helpers.assertProcessInfo(info.process);41helpers.assertOsInfo(info.os);42helpers.assertTrace(info.trace);43}44}45}46}).export(module);474849