diff --git a/Gruntfile.js b/Gruntfile.js index b96de5ee0c927..a0ca9148dc979 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -179,7 +179,13 @@ module.exports = function(grunt) { 'test:webdriver:phantomjs', 'coverage:parse' ]); - grunt.registerTask('test', ['build:test', 'build:basic', 'test:webdriver:phantomjs']); + grunt.registerTask('test', function() { + if (grunt.option('debug')) { + grunt.task.run('build:test', 'build:basic', 'connect:server:keepalive'); + } else { + grunt.task.run('build:test', 'build:basic', 'test:webdriver:phantomjs'); + } + }); grunt.registerTask('perf', ['build:perf', 'perf:webdriver:phantomjs']); grunt.registerTask('npm:test', ['build', 'npm:pack']); diff --git a/README.md b/README.md index 3b535d41231be..2d27e438a2650 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ We use grunt to automate many tasks. Run `grunt -h` to see a mostly complete lis ```sh # Build and run tests with PhantomJS grunt test +# Build and run tests in your browser +grunt test --debug # Lint the code with JSHint grunt lint # Wipe out build directory