1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | 'use strict';
|
10 |
|
11 | module.exports = function(grunt) {
|
12 |
|
13 |
|
14 | grunt.initConfig({
|
15 | jshint: {
|
16 | all: [
|
17 | 'Gruntfile.js',
|
18 | 'tasks/*.js',
|
19 | '<%= nodeunit.tests %>'
|
20 | ],
|
21 | options: {
|
22 | jshintrc: '.jshintrc'
|
23 | }
|
24 | },
|
25 |
|
26 |
|
27 | clean: {
|
28 | tests: ['tmp']
|
29 | },
|
30 |
|
31 |
|
32 | blueprint_test_runner: {
|
33 | default_options: {
|
34 | options: {
|
35 | },
|
36 | files: {
|
37 | 'tmp/default_options': ['test/fixtures/testing', 'test/fixtures/123']
|
38 | }
|
39 | },
|
40 | custom_options: {
|
41 | options: {
|
42 | separator: ': ',
|
43 | punctuation: ' !!!'
|
44 | },
|
45 | files: {
|
46 | 'tmp/custom_options': ['test/fixtures/testing', 'test/fixtures/123']
|
47 | }
|
48 | }
|
49 | },
|
50 |
|
51 |
|
52 | nodeunit: {
|
53 | tests: ['test/*_test.js']
|
54 | }
|
55 |
|
56 | });
|
57 |
|
58 |
|
59 | grunt.loadTasks('tasks');
|
60 |
|
61 |
|
62 | grunt.loadNpmTasks('grunt-contrib-jshint');
|
63 | grunt.loadNpmTasks('grunt-contrib-clean');
|
64 | grunt.loadNpmTasks('grunt-contrib-nodeunit');
|
65 |
|
66 |
|
67 |
|
68 | grunt.registerTask('test', ['clean', 'blueprint_test_runner', 'nodeunit']);
|
69 |
|
70 |
|
71 | grunt.registerTask('default', ['jshint']);
|
72 |
|
73 | };
|