diff --git a/test/common.js b/test/common.js index c15042c8ee89a4..0e59d192f8d9d1 100644 --- a/test/common.js +++ b/test/common.js @@ -369,8 +369,7 @@ process.on('exit', function() { if (!exports.globalCheck) return; const leaked = leakedGlobals(); if (leaked.length > 0) { - console.error('Unknown globals: %s', leaked); - fail('Unknown global found'); + fail(`Unexpected global(s) found: ${leaked.join(', ')}`); } });