test: replace console.log() with debuglog()

PR-URL: https://github.com/nodejs/node/pull/32550
Refs: https://github.com/nodejs/node/pull/32541
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
pull/32627/head
Juan José Arboleda 2020-03-29 12:27:51 -05:00 committed by Anna Henningsen
parent 6480f89b77
commit 579e6b95ae
No known key found for this signature in database
GPG Key ID: A94130F0BFC8EBE9
1 changed files with 3 additions and 2 deletions

View File

@ -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');
@ -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;
}
@ -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}`);
});
};