Prevent forceOutput in test reporter from crashing.

This commit is contained in:
Richard Moore 2020-05-03 21:50:03 -04:00
parent e96b43e84d
commit cafd34460b
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

View File

@ -85,7 +85,7 @@ export function Reporter(runner: Runner) {
function forceOutput() {
if (((getTime() - lastOutput) / 1000) > MAX_DELAY) {
const currentSuite = suites[suites.length - 1];
log('[ Still running suite - test #' + currentSuite._countTotal + ' ]');
log(`[ Still running suite - test # ${ (currentSuite ? currentSuite._countTotal: "0") } ]`);
}
}