diff --git a/test/common.js b/test/common.js index 69d930ec245522..88fed0708b75a9 100644 --- a/test/common.js +++ b/test/common.js @@ -402,8 +402,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(', ')}`); } });