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: replace console.log for debug in test #32550

Closed
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
test: replace console.log() with debuglog()
  • Loading branch information
juanarbol committed Mar 30, 2020
commit 79d3d956dd9e676bdbca3be95f04910ad8e9a370
5 changes: 3 additions & 2 deletions test/parallel/test-process-exit-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'use strict';
require('../common');
const assert = require('assert');
const debug = require('util').debuglog('test');

const testCases = require('../fixtures/process-exit-code-cases');

Expand All @@ -30,7 +31,7 @@ if (!process.argv[2]) {
} else {
const i = parseInt(process.argv[2]);
if (Number.isNaN(i)) {
console.log('Invalid test case index');
debug('Invalid test case index');
process.exit(100);
return;
}
Expand All @@ -48,7 +49,7 @@ function parent() {
assert.strictEqual(
code, exit,
`wrong exit for ${arg}-${name}\nexpected:${exit} but got:${code}`);
console.log(`ok - ${arg} exited with ${exit}`);
debug(`ok - ${arg} exited with ${exit}`);
});
};

Expand Down