diff --git a/lib/assert/error.js b/lib/assert/error.js index 8239493..820571d 100644 --- a/lib/assert/error.js +++ b/lib/assert/error.js @@ -1,5 +1,5 @@ var stylize = require('vows/console').stylize; -var inspect = require('vows').inspect; +var inspect = require('vows/console').inspect; require('assert').AssertionError.prototype.toString = function () { var that = this, diff --git a/lib/vows.js b/lib/vows.js index 5fb583a..69ea226 100644 --- a/lib/vows.js +++ b/lib/vows.js @@ -17,7 +17,6 @@ // var sys = require('sys'), events = require('events'), - eyes = require('eyes').inspector({ stream: null }), vows = exports; require.paths.unshift(__dirname); @@ -36,10 +35,7 @@ vows.__defineGetter__('reporter', function () { var stylize = require('vows/console').stylize; -vows.inspect = function inspect(val) { - return '\033[1m' + eyes(val) + '\033[22m'; -}; - +vows.inspect = require('vows/console').inspect; vows.prepare = require('vows/extras').prepare; vows.tryEnd = require('vows/suite').tryEnd; diff --git a/lib/vows/console.js b/lib/vows/console.js index 8cc25f6..5a92660 100644 --- a/lib/vows/console.js +++ b/lib/vows/console.js @@ -1,3 +1,4 @@ +var eyes = require('eyes').inspector({ stream: null }); // Stylize a string this.stylize = function stylize(str, style) { @@ -43,3 +44,7 @@ this.result = function (event) { return buffer; }; + +this.inspect = function inspect(val) { + return '\033[1m' + eyes(val) + '\033[22m'; +};