Skip to content
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

test: remove common.inspect() #3257

Closed
wants to merge 2 commits into from
Closed
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
52 changes: 9 additions & 43 deletions test/parallel/test-fs-realpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,9 @@ function test_simple_relative_symlink(callback) {
unlink.push(t[0]);
});
var result = fs.realpathSync(entry);
assert.equal(result, path.resolve(expected),
'got ' + common.inspect(result) + ' expected ' +
common.inspect(expected));
assert.equal(result, path.resolve(expected));
asynctest(fs.realpath, [entry], callback, function(err, result) {
assert.equal(result, path.resolve(expected),
'got ' +
common.inspect(result) +
' expected ' +
common.inspect(expected));
assert.equal(result, path.resolve(expected));
});
}

Expand All @@ -125,17 +119,9 @@ function test_simple_absolute_symlink(callback) {
unlink.push(t[0]);
});
var result = fs.realpathSync(entry);
assert.equal(result, path.resolve(expected),
'got ' +
common.inspect(result) +
' expected ' +
common.inspect(expected));
assert.equal(result, path.resolve(expected));
asynctest(fs.realpath, [entry], callback, function(err, result) {
assert.equal(result, path.resolve(expected),
'got ' +
common.inspect(result) +
' expected ' +
common.inspect(expected));
assert.equal(result, path.resolve(expected));
});
}

Expand Down Expand Up @@ -163,11 +149,7 @@ function test_deep_relative_file_symlink(callback) {

assert.equal(fs.realpathSync(entry), path.resolve(expected));
asynctest(fs.realpath, [entry], callback, function(err, result) {
assert.equal(result, path.resolve(expected),
'got ' +
common.inspect(result) +
' expected ' +
common.inspect(path.resolve(expected)));
assert.equal(result, path.resolve(expected));
});
}

Expand Down Expand Up @@ -195,11 +177,7 @@ function test_deep_relative_dir_symlink(callback) {
assert.equal(fs.realpathSync(entry), path.resolve(expected));

asynctest(fs.realpath, [entry], callback, function(err, result) {
assert.equal(result, path.resolve(expected),
'got ' +
common.inspect(result) +
' expected ' +
common.inspect(path.resolve(expected)));
assert.equal(result, path.resolve(expected));
});
}

Expand Down Expand Up @@ -280,11 +258,7 @@ function test_relative_input_cwd(callback) {
assert.equal(fs.realpathSync(entry), path.resolve(expected));
asynctest(fs.realpath, [entry], callback, function(err, result) {
process.chdir(origcwd);
assert.equal(result, path.resolve(expected),
'got ' +
common.inspect(result) +
' expected ' +
common.inspect(path.resolve(expected)));
assert.equal(result, path.resolve(expected));
return true;
});
}
Expand Down Expand Up @@ -336,11 +310,7 @@ function test_deep_symlink_mix(callback) {
var expected = tmpAbsDir + '/cycles/root.js';
assert.equal(fs.realpathSync(entry), path.resolve(expected));
asynctest(fs.realpath, [entry], callback, function(err, result) {
assert.equal(result, path.resolve(expected),
'got ' +
common.inspect(result) +
' expected ' +
common.inspect(path.resolve(expected)));
assert.equal(result, path.resolve(expected));
return true;
});
}
Expand All @@ -355,11 +325,7 @@ function test_non_symlinks(callback) {
assert.equal(fs.realpathSync(entry), path.resolve(expected));
asynctest(fs.realpath, [entry], callback, function(err, result) {
process.chdir(origcwd);
assert.equal(result, path.resolve(expected),
'got ' +
common.inspect(result) +
' expected ' +
common.inspect(path.resolve(expected)));
assert.equal(result, path.resolve(expected));
return true;
});
}
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-memory-usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ var common = require('../common');
var assert = require('assert');

var r = process.memoryUsage();
console.log(common.inspect(r));
assert.equal(true, r['rss'] > 0);
1 change: 0 additions & 1 deletion test/sequential/test-memory-usage-emfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ while (files.length < 256)
files.push(fs.openSync(__filename, 'r'));

var r = process.memoryUsage();
console.log(common.inspect(r));
assert.equal(true, r['rss'] > 0);