Skip to content

Hi! I fixed some calls to "sys" for you! #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var http = require('http');
var events = require('events');
var inherits = require('sys').inherits;
var inherits = require('util').inherits;
var nquery = require('../lib/nquery');

function WebClient(host, path) {
Expand Down
14 changes: 7 additions & 7 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ try {
var testrunner = require('nodeunit').testrunner;
}
catch(e) {
var sys = require('sys');
sys.puts("Cannot find nodeunit module.");
sys.puts("You can download submodules for this project by doing:");
sys.puts("");
sys.puts(" git submodule init");
sys.puts(" git submodule update");
sys.puts("");
var util = require('util');
util.puts("Cannot find nodeunit module.");
util.puts("You can download submodules for this project by doing:");
util.puts("");
util.puts(" git submodule init");
util.puts(" git submodule update");
util.puts("");
process.exit();
}

Expand Down
6 changes: 3 additions & 3 deletions test/nodeunit/nodeunit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var assert = require('assert'),
fs = require('fs'),
sys = require('sys');
util = require('util');


exports.testrunner = require('./testrunner');
Expand Down Expand Up @@ -45,8 +45,8 @@ var testEnv = function(start, options){
if(Object.getOwnPropertyDescriptor(e,'actual')
&& Object.getOwnPropertyDescriptor(e,'expected')){

var actual = sys.inspect(e.actual).replace(/\n$/,'');
var expected = sys.inspect(e.expected).replace(/\n$/,'');
var actual = util.inspect(e.actual).replace(/\n$/,'');
var expected = util.inspect(e.expected).replace(/\n$/,'');
var multiline = (
actual.indexOf('\n') != -1 ||
expected.indexOf('\n') != -1
Expand Down
14 changes: 7 additions & 7 deletions test/nodeunit/testrunner.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var nodeunit = require('./nodeunit'),
sys = require('sys');
util = require('util');



Expand All @@ -13,17 +13,17 @@ exports.run = function(files){

nodeunit.runFiles(files, {
moduleStart: function(name){
sys.puts('\n' + bold(name));
util.puts('\n' + bold(name));
},
testDone: function(name, assertions){
if(!assertions.failures){
sys.puts('✔ ' + name);
util.puts('✔ ' + name);
}
else {
sys.puts(red('✖ ' + name) + '\n');
util.puts(red('✖ ' + name) + '\n');
assertions.forEach(function(assertion){
if(assertion.failed()){
sys.puts(assertion.error.stack + '\n');
util.puts(assertion.error.stack + '\n');
}
});
}
Expand All @@ -32,14 +32,14 @@ exports.run = function(files){
var end = new Date().getTime();
var duration = end - start;
if(assertions.failures){
sys.puts(
util.puts(
'\n' + bold(red('FAILURES: ')) + assertions.failures +
'/' + assertions.length + ' assertions failed (' +
assertions.duration + 'ms)'
);
}
else {
sys.puts(
util.puts(
'\n' + bold(green('OK: ')) + assertions.length +
' assertions (' + assertions.duration + 'ms)'
);
Expand Down