2014-09-04 00:15:58 +02:00
|
|
|
var _ = require('lodash');
|
2014-02-11 00:09:04 +01:00
|
|
|
module.exports = function (grunt) {
|
2014-09-20 00:41:25 +02:00
|
|
|
grunt.registerTask('test', function () {
|
2014-10-02 02:38:35 +02:00
|
|
|
if (grunt.option('quick')) {
|
|
|
|
grunt.task.run('quick-test');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-07-28 02:13:45 +02:00
|
|
|
grunt.task.run(_.compact([
|
2015-08-03 18:35:31 +02:00
|
|
|
'eslint:source',
|
2015-06-05 01:19:11 +02:00
|
|
|
'simplemocha:all',
|
2015-08-12 21:33:54 +02:00
|
|
|
'maybeStartTestServer',
|
2015-07-28 02:24:07 +02:00
|
|
|
'karma:unit'
|
2015-07-28 02:13:45 +02:00
|
|
|
]));
|
2014-09-20 00:41:25 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
grunt.registerTask('quick-test', function () {
|
2015-06-05 01:19:11 +02:00
|
|
|
grunt.task.run([
|
|
|
|
'simplemocha:all',
|
2015-08-12 21:33:54 +02:00
|
|
|
'maybeStartTestServer',
|
2015-07-28 02:24:07 +02:00
|
|
|
'karma:unit'
|
2015-06-05 01:19:11 +02:00
|
|
|
]);
|
2014-09-16 22:50:01 +02:00
|
|
|
});
|
2014-02-24 23:14:31 +01:00
|
|
|
|
2014-09-12 00:37:23 +02:00
|
|
|
grunt.registerTask('test:watch', [
|
2015-08-07 20:49:56 +02:00
|
|
|
'maybeStartTestServer',
|
2014-02-24 23:14:31 +01:00
|
|
|
'watch:test'
|
2014-09-12 00:37:23 +02:00
|
|
|
]);
|
2014-02-24 23:14:31 +01:00
|
|
|
};
|