I can't sing the praises enough of entr. Just check out its man page: http://eradman.com/entrproject/
entr lets you watch files and re-run a command any time they change. Whenever I'm working on a script, or go tests, or whatever test-like thing I'm doing that's not in its own bloated test harness, I reach for entr. Great software, does what it's supposed to every time.
I use a similar tool called reflex: https://github.com/cespare/reflex