facebook/jest — pull request #96 by amasad (2014-07-21 18:22:59+00:00)
Title: Implement watching

* Implemented watching option in the TestRunner class.
* Added watching option to the bin.

The way this feature works is that it runs all tests on the first run when `--watch` is passed and then idles while watching the `testPathDirs` and when something has changed, deleted, or added, tests will be run that relates to the changed file (or dir).

I implemented this in `TestRunner` to be able to reuse it internally. And by doing so I had to move a lot of the file pattern matching logic into the class. But I think it's seems like it belonged there anyways.

closes #38 #7