Skip to content

Commit

Permalink
[Tests] tiny cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 11, 2021
1 parent f7943d5 commit ac4e311
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions tests/helpers/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
),
};
Expand Down

0 comments on commit ac4e311

Please sign in to comment.