Skip to content

Commit

Permalink
fix(:run) don't fail Grunt on failing tests in run mode
Browse files Browse the repository at this point in the history
  • Loading branch information
geddski committed Mar 10, 2013
1 parent 2f5e296 commit 5fa7067
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -100,7 +100,7 @@ watch: {
},
```

In one terminal window start the testacular server by running `$ grunt testacular`. In another terminal window start grunt watch by running `$ grunt watch`. Now when grunt watch detects a change to one of those files, it will run the testacular tests using the already running testacular server. This is the preferred method for development.
In one terminal window start the testacular server by running `$ grunt testacular`. In another terminal window start grunt watch by running `$ grunt watch`. Now when grunt watch detects a change to one of those files, it will run the testacular tests using the already running testacular server. This is the preferred method for development. Note that when tests fail in this mode, gruntacular will intentionally **not** fail, so that your watch task will continue running.

###Single Run
Keeping a browser window & testacular server running during development is productive, but not a good solution for build processes. For that reason testacular provides a "continuous integration" mode, which will launch the specified browser(s), run the tests, and close the browser(s). It also supports running tests in [PhantomJS](http://phantomjs.org/), a headless webkit browser which is great for running tests as part of a build. To run tests in continous integration mode just add the `singleRun` option:
Expand Down
4 changes: 2 additions & 2 deletions tasks/gruntacular.js
Expand Up @@ -22,9 +22,9 @@ module.exports = function(grunt) {
if (data.configFile) {
data.configFile = grunt.template.process(data.configFile);
}
//support `testacular run`, useful for grunt watch
//support `testacular run`, useful for grunt watch/regarde task
if (this.flags.run){
runner.run(data, finished.bind(done));
runner.run(data, done);
return;
}
server.start(data, finished.bind(done));
Expand Down

0 comments on commit 5fa7067

Please sign in to comment.