From 0542146933b23ad65d11ff08daa12eef831999c9 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 20 May 2022 07:22:21 -0700 Subject: [PATCH] Add missing space after colon Instead of: The following leaks were detected:Symbol(undici.globalDispatcher.1) ...use this: The following leaks were detected: Symbol(undici.globalDispatcher.1) --- lib/reporters/console.js | 2 +- test/reporters.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/reporters/console.js b/lib/reporters/console.js index ea17532c..18e9dc5e 100755 --- a/lib/reporters/console.js +++ b/lib/reporters/console.js @@ -265,7 +265,7 @@ internals.Reporter.prototype.end = function (notebook) { if (notebook.leaks) { if (notebook.leaks.length) { - output += red('The following leaks were detected:' + notebook.leaks.join(', ')) + '\n'; + output += red('The following leaks were detected: ' + notebook.leaks.join(', ')) + '\n'; } else { output += 'Leaks: ' + green('No issues') + '\n'; diff --git a/test/reporters.js b/test/reporters.js index 70e8c3ce..0e43025a 100755 --- a/test/reporters.js +++ b/test/reporters.js @@ -458,7 +458,7 @@ describe('Reporter', () => { const result = output.replace(/at.*\.js\:\d+\:\d+\)?/g, 'at '); expect(result).to.contain('Expected true to equal specified value'); expect(result).to.contain('1 of 1 tests failed'); - expect(result).to.contain('The following leaks were detected:x1'); + expect(result).to.contain('The following leaks were detected: x1'); }); it('generates a report with multi-line diff', async () => { @@ -477,7 +477,7 @@ describe('Reporter', () => { delete global.x1; expect(code).to.equal(1); - expect(output).to.contain('The following leaks were detected:x1'); + expect(output).to.contain('The following leaks were detected: x1'); expect(output).to.contain('Expected'); });