From 3fad9e4ef09bef86fdb504ad455b2a0a08e2525c Mon Sep 17 00:00:00 2001 From: Juan Soto Date: Sat, 30 Jan 2016 11:57:49 -0500 Subject: [PATCH 1/3] Return empty string instead of null for a single anonymous test --- lib/reporters/verbose.js | 2 +- test/reporters/verbose.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/reporters/verbose.js b/lib/reporters/verbose.js index 698cb7799..3d03fa640 100644 --- a/lib/reporters/verbose.js +++ b/lib/reporters/verbose.js @@ -27,7 +27,7 @@ VerboseReporter.prototype.test = function (test) { } if (this.api.fileCount === 1 && this.api.testCount === 1 && test.title === '[anonymous]') { - return null; + return ''; } // display duration only over a threshold diff --git a/test/reporters/verbose.js b/test/reporters/verbose.js index 8aad2e9db..f82c4bc6b 100644 --- a/test/reporters/verbose.js +++ b/test/reporters/verbose.js @@ -70,7 +70,7 @@ test('don\'t display test title if there is only one anonymous test', function ( title: '[anonymous]' }); - t.is(output, null); + t.is(output, ''); t.end(); }); From 3b1d1cde2fe7f0645c75e6190bcc3c8909554a14 Mon Sep 17 00:00:00 2001 From: Juan Soto Date: Mon, 1 Feb 2016 09:33:04 -0500 Subject: [PATCH 2/3] Return `undefined` instead of empty string --- lib/reporters/verbose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reporters/verbose.js b/lib/reporters/verbose.js index 3d03fa640..9c97f6d95 100644 --- a/lib/reporters/verbose.js +++ b/lib/reporters/verbose.js @@ -27,7 +27,7 @@ VerboseReporter.prototype.test = function (test) { } if (this.api.fileCount === 1 && this.api.testCount === 1 && test.title === '[anonymous]') { - return ''; + return undefined; } // display duration only over a threshold From c7ee71cc5d2afc723b9c1a0fb685fb1f73e4dcfd Mon Sep 17 00:00:00 2001 From: Juan Soto Date: Mon, 1 Feb 2016 09:43:05 -0500 Subject: [PATCH 3/3] Update single anonymous test test --- test/reporters/verbose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/reporters/verbose.js b/test/reporters/verbose.js index f82c4bc6b..a4795c252 100644 --- a/test/reporters/verbose.js +++ b/test/reporters/verbose.js @@ -70,7 +70,7 @@ test('don\'t display test title if there is only one anonymous test', function ( title: '[anonymous]' }); - t.is(output, ''); + t.is(output, undefined); t.end(); });