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

Do not report warnings as errors in quiet mode #212

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

ken-kenware
Copy link
Contributor

Hello!

This PR addresses issue #211

When the quiet cliOption is passed the call to ESLint's getErrorResults filters out warnings, which is expected. Prior to this PR we were using the full list of errors + warnings from ESLint to report the assertions, which incorrectly logged out warnings as error. This PR uses the filtered list instead if cliOptions.quiet is specified.

I tested this locally to make sure that it's working as expected, and also verified that the integration test also does not show the warnings.

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

very subtle change, lgtm if it's good with @SimenB

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

👍

@SimenB SimenB linked an issue Sep 18, 2023 that may be closed by this pull request
@SimenB SimenB merged commit ffc5c0d into jest-community:main Sep 18, 2023
90 checks passed
@SimenB
Copy link
Member

SimenB commented Sep 18, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cliOptions: { quiet: true }unexpectedly reports warnings
3 participants