-
Notifications
You must be signed in to change notification settings - Fork 6
/
gruntfile.js
50 lines (43 loc) · 1.04 KB
/
gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
files: [
'gruntfile.js',
'server/client/app/**/*.js',
'server/client/models/*.js',
'server/client/helpers/*.js',
'server/client/routes/*.js',
'server/client/app.js',
'specs/**/*.js'
],
options: {
globals: {
jQuery: true
}
},
},
shell: {
servertest:{
command: 'DEBUG=grump:* node ./server/bin/www & sleep 1; ./node_modules/.bin/mocha -R spec specs/server/*.js; pkill -n node;'
}
},
mochaTest: {
test: {
options: {
reporter: 'spec',
},
src: ['specs/server/*.js']
}
},
karma: {
unit: {
configFile:"karma.conf.js"
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.registerTask('test', ['jshint','shell:servertest','karma']);
};