-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
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 ran flow 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.