Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Commit

Permalink
feat: prettier exit message
Browse files Browse the repository at this point in the history
  • Loading branch information
FauxFaux committed Mar 22, 2020
1 parent 1213d8d commit 9b1e25c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion lib/render/index.ts
Expand Up @@ -96,5 +96,14 @@ export function pushProcessFailure(
status: 'failed',
});
result.numFailingTests += 1;
result.failureMessage += `\n... and the test *file* failed: ${code} ${sig}`;
result.failureMessage += `\n ... and ${chalk.red(`the test ${chalk.bold('file')} failed`)} `;
if (code) {
result.failureMessage += `with an exit code, ${chalk.red(code)}`;
}

if (sig) {
result.failureMessage += `with a signal, ${chalk.red(sig)}`;
}

result.failureMessage += '\n';
}
2 changes: 1 addition & 1 deletion test/fixtures/jest-demo.config.js
Expand Up @@ -5,7 +5,7 @@ module.exports = {
testMatch: ['<rootDir>/**/*.test.js'],
globals: {
'jest-runner-tap': {
tapCommand: ['../../node_modules/.bin/tap', '-R', 'tap'],
tapCommand: ['../../node_modules/.bin/tap', '-R', 'tap', '--timeout', '1'],
}
}
}
Expand Down

0 comments on commit 9b1e25c

Please sign in to comment.