From 99db2f65de00ca24b66d416d29c808db790d21f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Thu, 1 Aug 2013 16:14:52 -0400 Subject: [PATCH 1/2] fix(gruntfile): ensure all dependent grunt tasks are called for each testing task --- Gruntfile.js | 24 +++++++++++++++--------- lib/grunt/plugins.js | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 014fb8cd7440..b79467ca6248 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', ['package','test:unit', 'tests:docs', 'test:e2e']); + grunt.registerTask('test:jqlite', ['tests:jqlite']); + grunt.registerTask('test:jquery', ['tests:jquery']); + grunt.registerTask('test:modules', ['tests:modules']); + grunt.registerTask('test:docs', ['package', 'tests:docs']); + grunt.registerTask('test:unit', ['tests:jqlite', 'tests:jquery', 'tests:modules']); + grunt.registerTask('test:e2e', ['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..33c52abfa250 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', 'Run the unit tests with Karma', function(){ util.startKarma.call(util, this.data, true, this.async()); }); From 6313c527de8a1b530c1d27e31da7e5e2ad419630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Sun, 4 Aug 2013 11:40:24 -0400 Subject: [PATCH 2/2] chore(gruntfile): fix up the help text for the new test commands --- Gruntfile.js | 14 +++++++------- lib/grunt/plugins.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index b79467ca6248..6416352592c7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -230,13 +230,13 @@ module.exports = function(grunt) { //alias tasks - grunt.registerTask('test', ['package','test:unit', 'tests:docs', 'test:e2e']); - grunt.registerTask('test:jqlite', ['tests:jqlite']); - grunt.registerTask('test:jquery', ['tests:jquery']); - grunt.registerTask('test:modules', ['tests:modules']); - grunt.registerTask('test:docs', ['package', 'tests:docs']); - grunt.registerTask('test:unit', ['tests:jqlite', 'tests:jquery', 'tests:modules']); - grunt.registerTask('test:e2e', ['connect:testserver', 'tests:end2end']); + 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']); diff --git a/lib/grunt/plugins.js b/lib/grunt/plugins.js index 33c52abfa250..363b8698f53d 100644 --- a/lib/grunt/plugins.js +++ b/lib/grunt/plugins.js @@ -52,7 +52,7 @@ module.exports = function(grunt) { }); - grunt.registerMultiTask('tests', 'Run the unit tests with Karma', function(){ + grunt.registerMultiTask('tests', '**Use `grunt test` instead**', function(){ util.startKarma.call(util, this.data, true, this.async()); });