Assuming this isn't already a thing - I couldn't see it anywhere?
It's possible to do this simply with nodemon: nodemon --exec "spago test" --watch output -e js, but a simple flag like --watch could be useful to automatically re-run tests when files are changed.