From ac4e311f07413f87163b352ad96fadb2b0be7902 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 11 Dec 2021 09:20:49 -0800 Subject: [PATCH] [Tests] tiny cleanup --- tests/helpers/parsers.js | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) 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); } ), };