diff --git a/src/__tests__/definitions/invalid-map-ob-link.json b/src/__tests__/definitions/invalid-map-ob-link.json index 39c50fc..0f35049 100644 --- a/src/__tests__/definitions/invalid-map-ob-link.json +++ b/src/__tests__/definitions/invalid-map-ob-link.json @@ -1,5 +1,5 @@ { - "Comment": "An example of the Amazon States Language using a map state to map over items in parallel.", + "Comment": "The link to \"Final State\" from within the Iterator is invalid since the target state is defined outside of the Iterator", "StartAt": "Map", "States": { "Map": { diff --git a/src/__tests__/definitions/invalid-parallel-ob-link.json b/src/__tests__/definitions/invalid-parallel-ob-link.json index 038d8ff..5d40645 100644 --- a/src/__tests__/definitions/invalid-parallel-ob-link.json +++ b/src/__tests__/definitions/invalid-parallel-ob-link.json @@ -1,5 +1,5 @@ { - "Comment": "An example of the Amazon States Language using a parallel state to execute two branches at the same time.", + "Comment": "The link to the \"Final State\" within the Choice is invalid because it targets a state outside of its parent branch", "StartAt": "Parallel", "States": { "Parallel": { diff --git a/src/validator.js b/src/validator.js index b1d6c3d..0f8c956 100644 --- a/src/validator.js +++ b/src/validator.js @@ -62,7 +62,7 @@ function validator(definition) { errorList.push(ajv.errorsText(ajv.errors, { separator })); } errorList.push(missingTransitionTargetErrors.map(formatError).join(separator)); - errorList.push(transitionErrors.join(separator)); + errorList.push(transitionErrors.map(formatError).join(separator)); return errorList.join(separator); }, };