-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add flow type unit tests #1224
Comments
👍 Good idea! A pull request would be lovely :) |
leebyron
added a commit
to leebyron/ava
that referenced
this issue
Feb 5, 2017
Closes avajs#1224 This adds flow-bin, adds it to the test running script, and adds some regression tests based on prior issues. In an immediate proof of value (and proof of my own prior sloppiness) it spotted an issue that avajs#1219 sought to fix and did not do so. Fix included along with test.
Merged
leebyron
added a commit
to leebyron/ava
that referenced
this issue
Feb 6, 2017
Closes avajs#1224 This adds flow-bin, adds it to the test running script, and adds some regression tests based on prior issues. In an immediate proof of value (and proof of my own prior sloppiness) it spotted an issue that avajs#1219 sought to fix and did not do so. Fix included along with test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems like there have been a few issues recently with flow types being broken, perhaps we should add some unit tests for them. Opening an issue to gauge interest, I'm happy to do the initial setup work if folks think this is worthwhile.
Here's what's involved:
We would add
flow-bin
as a devDependency and add a.flowconfig
to the project, then add a file (or directory of files) that end in-test.js.flow
. We would also add a small script that ranflow check
on these files and pass if no errors were reported.Flow has a feature where you can annotate portions of your code that you expect a type error, that instead cause a flow check to fail if they do not produce a type error. This provides a nice way to write both positive and negative tests.
The text was updated successfully, but these errors were encountered: