Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/commands/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 8 additions & 0 deletions tests/commands/run.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down