diff --git a/lib/cli/run.js b/lib/cli/run.js index fbbe510e94..66c8cbbb66 100644 --- a/lib/cli/run.js +++ b/lib/cli/run.js @@ -369,7 +369,7 @@ exports.handler = async function (argv) { try { await runMocha(mocha, argv); } catch (err) { - console.error('\n' + (err.stack || `Error: ${err.message || err}`)); + console.error('\n Exception during run:', err); process.exit(1); } }; diff --git a/test/integration/reporters.spec.js b/test/integration/reporters.spec.js index 08fa7f85a3..9285dfe80c 100644 --- a/test/integration/reporters.spec.js +++ b/test/integration/reporters.spec.js @@ -211,7 +211,7 @@ describe('reporters', function () { return; } - var pattern = `^Error: invalid or unsupported TAP version: "${invalidTapVersion}"`; + var pattern = `Error: invalid or unsupported TAP version: "${invalidTapVersion}"`; expect(res, 'to satisfy', { code: 1, output: new RegExp(pattern, 'm')