Added jshint file for unit tests, and grunt task to verify test syntax.

This commit is contained in:
Torkel Ödegaard
2014-04-06 10:47:14 +02:00
parent 6795383461
commit 4029dc3165
14 changed files with 71 additions and 25 deletions
+1
View File
@@ -3,6 +3,7 @@ module.exports = function(grunt) {
// Concat and Minify the src directory into dist
grunt.registerTask('build', [
'jshint:source',
'jshint:tests',
'clean:on_start',
'less:src',
'copy:everything_but_less_to_temp',
+1 -1
View File
@@ -1,5 +1,5 @@
// Lint and build CSS
module.exports = function(grunt) {
grunt.registerTask('default', ['jshint:source', 'less:src']);
grunt.registerTask('default', ['jshint:source', 'jshint:tests', 'less:src']);
grunt.registerTask('test', ['default', 'karma:test']);
};
+8 -3
View File
@@ -1,13 +1,18 @@
module.exports = function(config) {
return {
// just lint the source dir
source: {
files: {
src: ['Gruntfile.js', '<%= srcDir %>/app/**/*.js']
src: ['Gruntfile.js', '<%= srcDir %>/app/**/*.js'],
}
},
tests: {
files: {
src: ['<%= srcDir %>/test/**/*.js'],
}
},
options: {
jshintrc: '<%= baseDir %>/.jshintrc',
jshintrc: true,
reporter: require('jshint-stylish'),
ignores: [
'node_modules/*',
'dist/*',