facebook/flow — pull request #152 by unknownexception (2014-12-01 03:49:08+00:00)
Title: add lib tests

From https://github.com/joyent/node/tree/master/test/simple

This is a demonstration pull request. I hope there is no legal issues.

```shell
./bin/flow check ./lib_tests --all
Found 5169 errors
./bin/flow check ./lib_tests --all --show-all-errors | grep -c "Property not found in"
637
./bin/flow check ./lib_tests --all --show-all-errors | grep -c "Required module not found"
805
./bin/flow check ./lib_tests --all --show-all-errors | grep -c "Too few arguments (expected default/rest parameters in function)"
155
```

For example, I can test only `fs` related functions https://github.com/facebook/flow/pull/148:
```bash
find lib_tests/simple/test-fs-*.js* | while read line; do
echo $line
./bin/flow check-contents < $line
done
```
It would produce tons of errors, most of it can be easily fixed (especially `This type is incompatible with`).