Export 0.2.1
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / node_modules / grunt / node_modules / prompt / node_modules / winston / test / exception-test.js
1 /*
2  * exception-test.js: Tests for exception data gathering in winston.
3  *
4  * (C) 2010 Charlie Robbins
5  * MIT LICENSE
6  *
7  */
8
9 var path = require('path'),
10     vows = require('vows'),
11     assert = require('assert'),
12     winston = require('../lib/winston'),
13     helpers = require('./helpers');
14
15 vows.describe('winston/exception').addBatch({
16   "When using the winston exception module": {
17     "the getProcessInfo() method": {
18       topic: winston.exception.getProcessInfo(),
19       "should respond with the appropriate data": function (info) {
20         helpers.assertProcessInfo(info);
21       }
22     },
23     "the getOsInfo() method": {
24       topic: winston.exception.getOsInfo(),
25       "should respond with the appropriate data": function (info) {
26         helpers.assertOsInfo(info);
27       }
28     },
29     "the getTrace() method": {
30       topic: winston.exception.getTrace(new Error()),
31       "should have the appropriate info": function (trace) {
32         helpers.assertTrace(trace);
33       }
34     },
35     "the getAllInfo() method": {
36       topic: winston.exception.getAllInfo(new Error()),
37       "should have the appropriate info": function (info) {
38         assert.isObject(info);
39         assert.isArray(info.stack);
40         helpers.assertProcessInfo(info.process);
41         helpers.assertOsInfo(info.os);
42         helpers.assertTrace(info.trace);
43       }
44     }
45   }
46 }).export(module);