diff --git a/lib/vows.js b/lib/vows.js index 44e5cf2..e5fe6e2 100644 --- a/lib/vows.js +++ b/lib/vows.js @@ -15,7 +15,7 @@ // } // }).run(); // -var sys = require('sys'), +var util = require('util'), path = require('path'), events = require('events'), vows = exports; @@ -141,7 +141,7 @@ process.on('exit', function () { } }); - if (unFired.length > 0) { sys.print('\n') } + if (unFired.length > 0) { util.print('\n') } unFired.forEach(function (title) { s.reporter.report(['error', { @@ -161,7 +161,7 @@ process.on('exit', function () { }); }); if (failure) { - sys.puts(console.result(results)); + util.puts(console.result(results)); } }); diff --git a/lib/vows/coverage/report-html.js b/lib/vows/coverage/report-html.js index 8ae15df..f7e5b72 100644 --- a/lib/vows/coverage/report-html.js +++ b/lib/vows/coverage/report-html.js @@ -1,4 +1,4 @@ -var sys = require('sys'), +var util = require('util'), fs = require('fs'), file = require('./file'); @@ -21,7 +21,7 @@ this.report = function (coverageMap) { head = fs.readFileSync(__dirname + "/fragments/coverage-head.html", "utf8"); foot = fs.readFileSync(__dirname + "/fragments/coverage-foot.html", "utf8"); } catch (error) { - sys.print("Error: Unable to write to file coverage.html\n"); + util.print("Error: Unable to write to file coverage.html\n"); return; } @@ -51,4 +51,4 @@ this.report = function (coverageMap) { fs.writeSync(out, foot); fs.close(out); -}; \ No newline at end of file +}; diff --git a/lib/vows/coverage/report-json.js b/lib/vows/coverage/report-json.js index 90fea22..bcbab25 100644 --- a/lib/vows/coverage/report-json.js +++ b/lib/vows/coverage/report-json.js @@ -1,4 +1,4 @@ -var sys = require('sys'), +var util = require('util'), fs = require('fs'), file = require('./file'); @@ -48,7 +48,7 @@ this.report = function (coverageMap) { fs.writeSync(out, JSON.stringify(output)); fs.close(out); } catch (error) { - sys.print("Error: Unable to write to file coverage.json\n"); + util.print("Error: Unable to write to file coverage.json\n"); return; } -}; \ No newline at end of file +}; diff --git a/lib/vows/coverage/report-plain.js b/lib/vows/coverage/report-plain.js index e82e42f..9de7005 100644 --- a/lib/vows/coverage/report-plain.js +++ b/lib/vows/coverage/report-plain.js @@ -1,4 +1,4 @@ -var sys = require('sys'), +var util = require('util'), file = require('./file'); this.name = 'coverage-report-plain'; @@ -24,15 +24,15 @@ this.report = function (coverageMap) { if (coverageMap.hasOwnProperty(filename)) { var data = file.coverage(filename, coverageMap[filename]); - sys.print(filename + ":\n"); - sys.print("[ hits: " + data.hits + ", misses: " + data.misses); - sys.print(", sloc: " + data.sloc + ", coverage: " + data.coverage.toFixed(2) + "% ]\n"); + util.print(filename + ":\n"); + util.print("[ hits: " + data.hits + ", misses: " + data.misses); + util.print(", sloc: " + data.sloc + ", coverage: " + data.coverage.toFixed(2) + "% ]\n"); for (var i = 0; i < data.source.length; i++) { - sys.print(lpad(data.source[i].coverage, 5) + " | " + data.source[i].line + "\n"); + util.print(lpad(data.source[i].coverage, 5) + " | " + data.source[i].line + "\n"); } - sys.print("\n"); + util.print("\n"); } } -}; \ No newline at end of file +}; diff --git a/lib/vows/reporters/spec.js b/lib/vows/reporters/spec.js index 0f91146..7b9466e 100644 --- a/lib/vows/reporters/spec.js +++ b/lib/vows/reporters/spec.js @@ -1,4 +1,4 @@ -var sys = require('sys'); +var util = require('util'); var options = { tail: '\n' }; var console = require('../../vows/console'); @@ -28,7 +28,7 @@ this.report = function (data) { puts(console.vowText(event)); break; case 'end': - sys.print('\n'); + util.print('\n'); break; case 'finish': puts(console.result(event).join('\n')); @@ -40,5 +40,5 @@ this.report = function (data) { }; this.print = function (str) { - sys.print(str); + util.print(str); }; diff --git a/lib/vows/reporters/watch.js b/lib/vows/reporters/watch.js index f172481..58f6e3c 100644 --- a/lib/vows/reporters/watch.js +++ b/lib/vows/reporters/watch.js @@ -1,5 +1,3 @@ -var sys = require('sys'); - var options = {}; var console = require('../../vows/console'); var spec = require('../../vows/reporters/spec');