grunt-contrib-jasmine/Gruntfile.js

77 lines
1.7 KiB
JavaScript
Raw Normal View History

2012-11-02 13:03:09 +08:00
/*
* grunt-contrib-jasmine
* http://gruntjs.com/
*
* Copyright (c) 2012 GruntJS Team
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/**/*.js'
2012-11-02 13:03:09 +08:00
],
options: {
jshintrc: '.jshintrc'
}
},
watch: {
2013-02-24 08:44:19 +08:00
pivotal: {
files: ['test/fixtures/pivotal/**/*.js'],
tasks: 'jasmine:pivotal:build'
},
jasmine: {
files: ['test/fixtures/pivotal/**/*.js', 'tasks/**/*.js'],
tasks: 'jasmine:pivotal'
}
},
connect: {
test: {
port: 8000,
base: '.'
}
},
jasmine: {
options: {
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
junit: {
path: 'junit'
}
},
pivotal: {
src: 'test/fixtures/pivotal/src/**/*.js'
},
customTemplate: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
template: 'test/fixtures/customTemplate/custom.tmpl',
junit: {
path: 'junit/customTemplate',
consolidate: true
}
}
}
},
2012-11-02 13:03:09 +08:00
nodeunit: {
tasks: ['test/*_test.js']
}
});
grunt.loadTasks('tasks');
2013-02-24 08:43:29 +08:00
grunt.loadNpmTasks('grunt-contrib-watch');
2012-11-02 13:03:09 +08:00
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-internal');
2013-02-24 08:44:19 +08:00
grunt.registerTask('watch-test', ['connect', 'watch:pivotal']);
grunt.registerTask('test', ['jshint', 'jasmine:pivotal', 'jasmine:customTemplate', 'nodeunit']);
grunt.registerTask('default', ['test', 'build-contrib']);
2012-11-02 13:03:09 +08:00
};