1 | 'use strict';
|
2 |
|
3 | module.exports = function (grunt) {
|
4 | require('load-grunt-tasks')(grunt);
|
5 |
|
6 | grunt.initConfig({
|
7 | watch: {
|
8 | testNLint: {
|
9 | files: '{lib,test}/**/*.js',
|
10 | tasks: ['jshint', 'mochaTest']
|
11 | },
|
12 | },
|
13 |
|
14 | jshint: {
|
15 | options: {
|
16 | jshintrc: '.jshintrc',
|
17 | reporter: require('jshint-stylish'),
|
18 | reporterOutput: ''
|
19 | },
|
20 | all: '{lib,test}/**/*.js'
|
21 | },
|
22 |
|
23 | mochaTest: {
|
24 | options: {
|
25 | reporter: 'spec',
|
26 | globals: ['chai', 'should'],
|
27 | require: 'test/common'
|
28 | },
|
29 | src: 'test/**/*.spec.js'
|
30 | },
|
31 | });
|
32 |
|
33 | grunt.registerTask('dev', ['watch']);
|
34 | grunt.registerTask('test', ['mochaTest']);
|
35 | grunt.registerTask('ci', ['jshint:all', 'mochaTest']);
|
36 | };
|