Skip to content

Commit

Permalink
move inspect() to vows/console
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Jun 7, 2010
1 parent fe7ae18 commit cca5d46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/assert/error.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
6 changes: 1 addition & 5 deletions lib/vows.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
//
var sys = require('sys'),
events = require('events'),
eyes = require('eyes').inspector({ stream: null }),
vows = exports;

require.paths.unshift(__dirname);
Expand All @@ -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;

Expand Down
5 changes: 5 additions & 0 deletions lib/vows/console.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var eyes = require('eyes').inspector({ stream: null });

// Stylize a string
this.stylize = function stylize(str, style) {
Expand Down Expand Up @@ -43,3 +44,7 @@ this.result = function (event) {

return buffer;
};

this.inspect = function inspect(val) {
return '\033[1m' + eyes(val) + '\033[22m';
};

0 comments on commit cca5d46

Please sign in to comment.