Skip to content

Commit ac4e311

Browse files
committed
[Tests] tiny cleanup
1 parent f7943d5 commit ac4e311

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

tests/helpers/parsers.js

+4-18
Original file line numberDiff line numberDiff line change
@@ -82,26 +82,12 @@ const parsers = {
8282
errors: testObject.errors.map(
8383
(errorObject) => {
8484
const nextSuggestions = errorObject.suggestions && {
85-
suggestions: errorObject.suggestions.map(
86-
(suggestion) => {
87-
const nextSuggestion = Object.assign(
88-
{},
89-
suggestion,
90-
{ output: suggestion.output + extraComment }
91-
);
92-
93-
return nextSuggestion;
94-
}
95-
),
85+
suggestions: errorObject.suggestions.map((suggestion) => Object.assign({}, suggestion, {
86+
output: suggestion.output + extraComment,
87+
})),
9688
};
9789

98-
const nextErrorObject = Object.assign(
99-
{},
100-
errorObject,
101-
nextSuggestions
102-
);
103-
104-
return nextErrorObject;
90+
return Object.assign({}, errorObject, nextSuggestions);
10591
}
10692
),
10793
};

0 commit comments

Comments
 (0)