From 309356e90c1f0d70f62fd6171c653718ee52e30e Mon Sep 17 00:00:00 2001 From: Gabor Javorszky Date: Sun, 27 Sep 2015 18:29:14 +0100 Subject: [PATCH] Make grunt test fail if no filename provided Closes #5885 Instead of hiding a notice in a sea of printed stack traces among the eventual error, this change will cause grunt test to halt and output an error message with some helpful info as to what went wrong. --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index de00ce7eb6..acc2e731e9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -586,7 +586,7 @@ var _ = require('lodash'), grunt.registerTask('test', function (test) { if (!test) { - grunt.log.write('no test provided'); + grunt.fail.fatal('No test provided. `grunt test` expects a filename. e.g.: `grunt test:unit/apps_spec.js`. Did you mean `npm test` or `grunt validate`?'); } grunt.task.run('test-setup', 'shell:test:' + test);