Skip to content

Commit

Permalink
Add dynamic alias task for running individual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Nov 28, 2013
1 parent 8d8c369 commit f029989
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ module.exports = function(grunt) {
test: {
src: ['test/**/*_test.js']
},
}
},
});

// Dynamic alias task to nodeunit. Run individual tests with: grunt test:events
grunt.registerTask('test', function(file) {
grunt.config('nodeunit.files', String(grunt.config('nodeunit.files')).replace('*', file || '*'));
grunt.task.run('nodeunit');
});

grunt.loadNpmTasks('grunt-benchmark');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
Expand Down

0 comments on commit f029989

Please sign in to comment.