Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(gruntfile): ensure all dependent grunt tasks are called for each testing task #3421

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
]
}
},
Expand Down Expand Up @@ -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',
Expand All @@ -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'
},


Expand Down Expand Up @@ -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']);
Expand Down
2 changes: 1 addition & 1 deletion lib/grunt/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});

Expand Down