forked from tonymilne/paginate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
68 lines (63 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
var path = require('path');
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
test: {
files: ['test/**/*.js']
},
simplemocha: {
all: {
src: 'test/**/*.js',
options: {
globals: {
describe: true,
it: true,
before: true
},
timeout: 3000,
ignoreLeaks: false
// ui: 'bdd',
// reporter: 'tap'
}
}
},
watch: {
files: '<%= jshint.files %>',
tasks: 'default'
},
jshint: {
files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js'],
options: {
smarttabs: true,
trailing: true,
curly: true,
eqeqeq: true,
immed: true,
latedef: false,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
node: true,
es5: false,
globals: {
describe: true,
it: true,
before: true,
after: true,
exports: true
}
}
}
});
// Import custom tasks (and override the default test with mocha test).
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.registerTask('test', 'simplemocha');
// Default task.
grunt.registerTask('default', ['jshint', 'test']);
};