From 30d21fb6e69821bb7cce705b132daf1fbb16296b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Arboleda?= Date: Sun, 29 Mar 2020 12:27:51 -0500 Subject: [PATCH] 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 Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Yongsheng Zhang --- test/parallel/test-process-exit-code.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-process-exit-code.js b/test/parallel/test-process-exit-code.js index 9059b0b5c22487..2f658a172cdc5a 100644 --- a/test/parallel/test-process-exit-code.js +++ b/test/parallel/test-process-exit-code.js @@ -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}`); }); };