progtest: Output trailing newline after summary line

* src/reporter/ConsoleTestReporter.js (createSummaryLine): Output trailing
  newline.
* test/reporter/ConsoleTestReporterTest.js: Modify respective test.
master
Mike Gerwitz 2018-03-05 15:59:34 -05:00
parent 06435f9f17
commit 6cefab5344
2 changed files with 4 additions and 3 deletions

View File

@ -280,6 +280,6 @@ module.exports = Class( 'ConsoleTestReporter',
'virtual protected createSummaryLine'( test_total, failed, acount, afailed )
{
return `\n${test_total} tests, ${failed} failed (` +
`${acount} assertions, ${afailed} failures)`;
`${acount} assertions, ${afailed} failures)\n`;
},
} );

View File

@ -166,12 +166,13 @@ describe( "ConsoleTestReporter", () =>
const lines = output.split( '\n' );
// preceded by empty line
expect( lines[ lines.length - 2 ] ).to.equal( "" );
expect( lines[ lines.length - 3 ] ).to.equal( "" );
// last line
expect( lines[ lines.length - 1 ] ).to.equal(
expect( lines[ lines.length - 2 ] ).to.equal(
`5 tests, 2 failed (15 assertions, 3 failures)`
);
expect( lines[ lines.length - 1 ] ).to.equal( "" );
} );
} );
} );