Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: minor simplify format results error #11432

Merged
merged 3 commits into from May 21, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/jest-message-util/src/index.ts
Expand Up @@ -337,9 +337,9 @@ export const formatResultsErrors = (
): string | null => {
const failedResults: FailedResults = testResults.reduce<FailedResults>(
(errors, result) => {
result.failureMessages
.map(checkForCommonEnvironmentErrors)
.forEach(content => errors.push({content, result}));
result.failureMessages.forEach((item: string) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the explicit type annotation needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter warned about implicit any type

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I'm not seeing any error, let's try without

SimenB marked this conversation as resolved.
Show resolved Hide resolved
errors.push({content: checkForCommonEnvironmentErrors(item), result});
});
return errors;
},
[],
Expand Down