diff --git a/tests/helpers/parsers.js b/tests/helpers/parsers.js index 971844d8ec..cc6a29f21f 100644 --- a/tests/helpers/parsers.js +++ b/tests/helpers/parsers.js @@ -82,26 +82,12 @@ const parsers = { errors: testObject.errors.map( (errorObject) => { const nextSuggestions = errorObject.suggestions && { - suggestions: errorObject.suggestions.map( - (suggestion) => { - const nextSuggestion = Object.assign( - {}, - suggestion, - { output: suggestion.output + extraComment } - ); - - return nextSuggestion; - } - ), + suggestions: errorObject.suggestions.map((suggestion) => Object.assign({}, suggestion, { + output: suggestion.output + extraComment, + })), }; - const nextErrorObject = Object.assign( - {}, - errorObject, - nextSuggestions - ); - - return nextErrorObject; + return Object.assign({}, errorObject, nextSuggestions); } ), };