Skip to content

Commit

Permalink
Scenario: Improve getValidationOutcome error message, remove outdat…
Browse files Browse the repository at this point in the history
…ed JSDoc
  • Loading branch information
eyelidlessness committed Jul 12, 2024
1 parent 460f68a commit 23171c7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/scenario/src/jr/Scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,13 @@ export class Scenario {
return Promise.reject(new UnclearApplicabilityError('Scenario instance statefulness'));
}

/**
* @todo
*/
getValidationOutcome(): ValidateOutcome {
const [first, ...rest] = this.instanceRoot.validationState.violations;

if (rest.length > 0) {
throw 'todo';
throw new Error(
'TODO: what is an appropriate form-/Scenario-level ValidationOutcome when there is more than one violation?'
);
}

if (first == null) {
Expand Down

0 comments on commit 23171c7

Please sign in to comment.