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

Show Flow errors in yarn test (as a Jest reporter) #6617

Merged
merged 2 commits into from
Oct 15, 2018

Conversation

kumar303
Copy link
Contributor

This adds a custom Jest reporter that shows Flow errors in our test output.

In practical usage, I don't think there will be any impact to speed. There might be a couple seconds of delay when the server starts for the first time but that happens in parallel to the tests anyway.

This fixes mozilla/addons#12498 by removing the need to run yarn flow:dev. It even implements part of mozilla/addons#10342 🍰

I've actually wanted to see Flow errors in test output for a while but for some reason it never struck me to create a reporter! It also seems like a decent workaround to jestjs/jest#7124

Some examples:

Flow failures screenshot 2018-10-12 11 40 19
No Flow errors screenshot 2018-10-12 11 53 20

@kumar303
Copy link
Contributor Author

@willdurand I'm curious to see how this works for you since you don't use watch mode.

@codecov-io
Copy link

codecov-io commented Oct 12, 2018

Codecov Report

Merging #6617 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    mozilla/addons-frontend#6617   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files         239      239           
  Lines        6519     6519           
  Branches     1248     1248           
=======================================
  Hits         6378     6378           
  Misses        126      126           
  Partials       15       15

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37cc187...d7beff2. Read the comment docs.

@willdurand willdurand self-assigned this Oct 15, 2018
Copy link
Member

@willdurand willdurand left a comment

Choose a reason for hiding this comment

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

That works for me, thanks! r+

@kumar303 kumar303 merged commit c2c0fca into mozilla:master Oct 15, 2018
@kumar303 kumar303 deleted the flow-jest-reporter-6550 branch October 15, 2018 20:02
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.

jest --watch runs tests twice after chokidar accesses a file
3 participants