diff --git a/Gruntfile.js b/Gruntfile.js index 014fb8cd7440..6416352592c7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -31,11 +31,11 @@ module.exports = function(grunt) { stream: true }, tasks: [ - util.parallelTask('test:docs'), - util.parallelTask('test:modules'), - util.parallelTask('test:jquery'), - util.parallelTask('test:jqlite'), - util.parallelTask('test:e2e') + util.parallelTask('tests:docs'), + util.parallelTask('tests:modules'), + util.parallelTask('tests:jquery'), + util.parallelTask('tests:jqlite'), + util.parallelTask('tests:end2end') ] } }, @@ -80,7 +80,7 @@ module.exports = function(grunt) { }, - test: { + tests: { jqlite: 'karma-jqlite.conf.js', jquery: 'karma-jquery.conf.js', docs: 'karma-docs.conf.js', @@ -94,7 +94,7 @@ module.exports = function(grunt) { jqlite: 'karma-jqlite.conf.js', jquery: 'karma-jquery.conf.js', modules: 'karma-modules.conf.js', - docs: 'karma-docs.conf.js', + docs: 'karma-docs.conf.js' }, @@ -230,10 +230,16 @@ module.exports = function(grunt) { //alias tasks - grunt.registerTask('test:unit', ['test:jqlite', 'test:jquery', 'test:modules']); + grunt.registerTask('test', 'Run unit, docs and e2e tests with Karma', ['package','test:unit', 'tests:docs', 'test:e2e']); + grunt.registerTask('test:jqlite', 'Run the unit tests with Karma' , ['tests:jqlite']); + grunt.registerTask('test:jquery', 'Run the jQuery unit tests with Karma', ['tests:jquery']); + grunt.registerTask('test:modules', 'Run the Karma module tests with Karma', ['tests:modules']); + grunt.registerTask('test:docs', 'Run the doc-page tests with Karma', ['package', 'tests:docs']); + grunt.registerTask('test:unit', 'Run unit, jQuery and Karma module tests with Karma', ['tests:jqlite', 'tests:jquery', 'tests:modules']); + grunt.registerTask('test:e2e', 'Run the end to end tests with Karma and keep a test server running in the background', ['connect:testserver', 'tests:end2end']); grunt.registerTask('test:docgen', ['jasmine-node']); + grunt.registerTask('minify', ['bower','clean', 'build', 'minall']); - grunt.registerTask('test:e2e', ['connect:testserver', 'test:end2end']); grunt.registerTask('webserver', ['connect:devserver']); grunt.registerTask('package', ['bower','clean', 'buildall', 'minall', 'collect-errors', 'docs', 'copy', 'write', 'compress']); grunt.registerTask('ci-checks', ['ddescribe-iit', 'merge-conflict']); diff --git a/lib/grunt/plugins.js b/lib/grunt/plugins.js index a17f62ccfed9..363b8698f53d 100644 --- a/lib/grunt/plugins.js +++ b/lib/grunt/plugins.js @@ -52,7 +52,7 @@ module.exports = function(grunt) { }); - grunt.registerMultiTask('test', 'Run the unit tests with Karma', function(){ + grunt.registerMultiTask('tests', '**Use `grunt test` instead**', function(){ util.startKarma.call(util, this.data, true, this.async()); });