Skip to content

Commit 9f9c8bc

Browse files
committed
Merge pull request #1228 from spicyj/grunt-debug
Bring back `grunt test --debug`
2 parents 1d20924 + 9766ed5 commit 9f9c8bc

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Gruntfile.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,13 @@ module.exports = function(grunt) {
179179
'test:webdriver:phantomjs',
180180
'coverage:parse'
181181
]);
182-
grunt.registerTask('test', ['build:test', 'build:basic', 'test:webdriver:phantomjs']);
182+
grunt.registerTask('test', function() {
183+
if (grunt.option('debug')) {
184+
grunt.task.run('build:test', 'build:basic', 'connect:server:keepalive');
185+
} else {
186+
grunt.task.run('build:test', 'build:basic', 'test:webdriver:phantomjs');
187+
}
188+
});
183189
grunt.registerTask('perf', ['build:perf', 'perf:webdriver:phantomjs']);
184190
grunt.registerTask('npm:test', ['build', 'npm:pack']);
185191

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ We use grunt to automate many tasks. Run `grunt -h` to see a mostly complete lis
8787
```sh
8888
# Build and run tests with PhantomJS
8989
grunt test
90+
# Build and run tests in your browser
91+
grunt test --debug
9092
# Lint the code with JSHint
9193
grunt lint
9294
# Wipe out build directory

0 commit comments

Comments
 (0)