Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-04-10 15:23:06 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-04-10 15:56:50 -0400
commit2c29c295fef5e8512e881e90bc68530ad5bbee2d (patch)
treefd5c9db949ded4e03a443788ba0dcb4ad48d628a
parent42d192af792f5890a6d707caee5cb3c910a5eb9b (diff)
downloadtame-2c29c295fef5e8512e881e90bc68530ad5bbee2d.tar.gz
tame-2c29c295fef5e8512e881e90bc68530ad5bbee2d.tar.bz2
tame-2c29c295fef5e8512e881e90bc68530ad5bbee2d.zip
progtest: ConsoleTestReporter: Correct number of inds on first linev2.14.1
-rw-r--r--progtest/src/reporter/ConsoleTestReporter.js4
-rw-r--r--progtest/test/reporter/ConsoleTestReporterTest.js12
2 files changed, 8 insertions, 8 deletions
diff --git a/progtest/src/reporter/ConsoleTestReporter.js b/progtest/src/reporter/ConsoleTestReporter.js
index a6648e3..c87bcc1 100644
--- a/progtest/src/reporter/ConsoleTestReporter.js
+++ b/progtest/src/reporter/ConsoleTestReporter.js
@@ -138,8 +138,8 @@ module.exports = Class( 'ConsoleTestReporter',
*/
'virtual protected createResultProgress'( { i }, total )
{
- return ( i % 50 === 49 )
- ? ` ${i+1}/${total}\n`
+ return ( i % 50 === 0 )
+ ? ` ${i}/${total}\n`
: '';
},
diff --git a/progtest/test/reporter/ConsoleTestReporterTest.js b/progtest/test/reporter/ConsoleTestReporterTest.js
index c7fa459..8d882da 100644
--- a/progtest/test/reporter/ConsoleTestReporterTest.js
+++ b/progtest/test/reporter/ConsoleTestReporterTest.js
@@ -37,11 +37,11 @@ describe( "ConsoleTestReporter", () =>
const sut = Sut( stdout );
[
- { i: 0, failures: [] },
{ i: 1, failures: [] },
- { i: 2, failures: [ {} ] },
- { i: 3, failures: [ {}, {} ] },
- { i: 4, failures: [] },
+ { i: 2, failures: [] },
+ { i: 3, failures: [ {} ] },
+ { i: 4, failures: [ {}, {} ] },
+ { i: 5, failures: [] },
].forEach(
result => sut.testCaseResult( result, 5 )
);
@@ -50,7 +50,7 @@ describe( "ConsoleTestReporter", () =>
} );
- it( "outputs line break with count after 40 cases", () =>
+ it( "outputs line break with count after 50 cases", () =>
{
let output = '';
@@ -58,7 +58,7 @@ describe( "ConsoleTestReporter", () =>
const sut = Sut( stdout );
const results = ( new Array( 130 ) ).join( '.' ).split( '.' )
- .map( ( _, i ) => ( { i: i, failures: [] } ) );
+ .map( ( _, i ) => ( { i: i + 1, failures: [] } ) );
results.forEach(
result => sut.testCaseResult( result, 130 )