Skip to content

Commit 30d21fb

Browse files
juanarboltargos
authored andcommittedApr 22, 2020
test: replace console.log() with debuglog()
PR-URL: #32550 Refs: #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>
1 parent fcf1123 commit 30d21fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎test/parallel/test-process-exit-code.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'use strict';
2323
require('../common');
2424
const assert = require('assert');
25+
const debug = require('util').debuglog('test');
2526

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

@@ -30,7 +31,7 @@ if (!process.argv[2]) {
3031
} else {
3132
const i = parseInt(process.argv[2]);
3233
if (Number.isNaN(i)) {
33-
console.log('Invalid test case index');
34+
debug('Invalid test case index');
3435
process.exit(100);
3536
return;
3637
}
@@ -48,7 +49,7 @@ function parent() {
4849
assert.strictEqual(
4950
code, exit,
5051
`wrong exit for ${arg}-${name}\nexpected:${exit} but got:${code}`);
51-
console.log(`ok - ${arg} exited with ${exit}`);
52+
debug(`ok - ${arg} exited with ${exit}`);
5253
});
5354
};
5455

0 commit comments

Comments
 (0)
Please sign in to comment.