Friday, 6 September 2013

How do I set up a Grunt task that watches files and continually runs the tests every time a file changes

How do I set up a Grunt task that watches files and continually runs the
tests every time a file changes

My starting point is the Yeoman Backbone Generator. I have it set up and
running correctly.
Instead of having to manually run grunt test every time I want to test,
I'd rather have it running the tests automatically every time a file
changes.
I want to be still be able to run grunt server for all the awesomeness it
currently give me. Is there a way to add Continuous Integration (is that
the right word? I'm kind of new to that) to that grunt task?
Or would it be better to not touch grunt server and essentially eliminate
grunt test and replace it with something that runs in a separate terminal
like Testem or Karma.
Or could something like Testem or Karma be used through a grunt task
without losing useful functionality.

No comments:

Post a Comment