Skip to content

Commit

Permalink
Improve error message on mockStep failure
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob authored Feb 12, 2024
1 parent 0b6f849 commit 102fb83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/step-mocker/step-mocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export class StepMocker {
this.updateStep(workflow, jobId, stepIndex, mockStep);
}
} else {
throw new Error("Could not find step");
const stepQuery = { ...mockStep };
delete stepQuery.mockWith;
throw new Error(`Could not find step ${JSON.stringify(stepQuery)} in job ${jobId}\nin ${filePath}`);
}
}
stepsToAdd.forEach(s => this.addStep(workflow, s.jobId, s.stepIndex, s.mockStep));
Expand Down

0 comments on commit 102fb83

Please sign in to comment.