diff --git a/src/commands/run.js b/src/commands/run.js index e3ea1e4..183dd7f 100644 --- a/src/commands/run.js +++ b/src/commands/run.js @@ -446,7 +446,9 @@ export async function runCommand( }); output.cleanup(); } else { - output.error('Test run failed'); + output.error( + `Test command failed with exit code ${exitCode}. Check the command output above for the original failure.` + ); } return { success: false, exitCode }; } else { diff --git a/tests/commands/run.test.js b/tests/commands/run.test.js index b6b23d8..817eba4 100644 --- a/tests/commands/run.test.js +++ b/tests/commands/run.test.js @@ -345,6 +345,14 @@ describe('commands/run', () => { assert.strictEqual(result.success, false); assert.strictEqual(result.exitCode, 2); + assert.ok( + output.calls.some( + c => + c.method === 'error' && + c.args[0].includes('Test command failed with exit code 2') && + c.args[0].includes('Check the command output above') + ) + ); }); it('handles generic error during test run', async () => {