Budget should also collect errors. (#3181)

This commit is contained in:
Peter Hedenskog 2020-11-03 13:35:10 +01:00 committed by GitHub
parent a8e15f3d85
commit f2da17f92c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -80,7 +80,18 @@ module.exports = {
for (const url of Object.keys(this.result.working)) {
working = working + this.result.working[url].length;
}
log.info('Budget: %d working and %d failing tests', working, failing);
log.info(
'Budget: %d working, %d failing tests and %d errors',
working,
failing,
Object.keys(this.result.error).length
);
break;
}
case 'error': {
if (message.url) {
this.result.error[message.url] = message.data;
}
break;
}

View File

@ -26,7 +26,8 @@ dayjs.extend(utc);
const budgetResult = {
working: {},
failing: {}
failing: {},
error: {}
};
function hasFunctionFilter(functionName) {