0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

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.
This commit is contained in:
Gabor Javorszky 2015-09-27 18:29:14 +01:00
parent 769d6bfe13
commit 309356e90c

View file

@ -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);