-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
69 lines (61 loc) · 1.86 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ',
env: {
dev: {
NODE_ENV: 'dev'
},
test: {
NODE_ENV: 'test'
}
},
jasmine_node: {
coverage: {
},
options: {
forceExit: true,
captureExceptions: true,
junitreport: {
report: true,
savePath: "./reports/",
consolidated: true
}
},
functional: ['spec/functional/'],
unit: ['spec/unit/'],
all: ['spec']
},
migrations: {
path: "migrations",
template: grunt.file.read('migrations/_template.js'),
mongo: 'mongodb://localhost/unicefcontacts',
ext: "js"
},
coveralls: {
options: {
// LCOV coverage file relevant to every target
src: 'coverage/lcov.info',
// When true, grunt-coveralls will only print a warning rather than
// an error, to prevent CI builds from failing unnecessarily (e.g. if
// coveralls.io is down). Optional, defaults to false.
force: false
},
grunt_coveralls_coverage: {
// Target-specific LCOV coverage file
src: 'coverage/lcov.info'
}
}
});
grunt.registerTask('default', ['jasmine_node:all']);
grunt.loadNpmTasks('grunt-coveralls');
// Catch unhandled exceptions and show the stack trace. This is most
// useful when running the jasmine specs.
process.on('uncaughtException',function(e) {
grunt.log.error('Caught unhandled exception: ' + e.toString());
grunt.log.error(e.stack);
});
};