forked from nodemailer/wildduck
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
49 lines (42 loc) · 1.27 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
'use strict';
process.env.NODE_ENV = 'test';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
eslint: {
all: ['lib/**/*.js', 'imap-core/**/*.js', 'test/**/*.js', 'examples/**/*.js', 'Gruntfile.js']
},
mochaTest: {
all: {
options: {
reporter: 'spec'
},
// run imap-core tests first
src: ['imap-core/test/**/*-test.js', 'test/**/*-test.js']
}
},
wait: {
server: {
options: {
delay: 7 * 1000
}
}
},
shell: {
server: {
command: 'node server.js',
options: {
async: true
}
}
}
});
// Load the plugin(s)
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-shell-spawn');
grunt.loadNpmTasks('grunt-wait');
// Tasks
grunt.registerTask('default', ['eslint', 'shell:server', 'wait:server', 'mochaTest', 'shell:server:kill']);
grunt.registerTask('testonly', ['shell:server', 'wait:server', 'mochaTest', 'shell:server:kill']);
};