grunt-contrib-jasmine/Gruntfile.js

92 lines
2.4 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'
}
},
jasmine: {
pivotal: {
2013-06-16 00:38:39 +08:00
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
junit: {
path: 'junit'
}
}
2013-06-16 00:38:39 +08:00
},
phantom_polyfills: {
src: 'test/fixtures/phantom-polyfills/src/**/*.js',
options : {
specs : 'test/fixtures/phantom-polyfills/spec/**/*.js',
}
},
legacyVersion: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
2013-06-16 00:38:39 +08:00
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
version: '1.2.0',
junit: {
path: 'junit'
}
}
},
2013-06-16 01:13:26 +08:00
deepOutfile: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
2013-06-16 01:13:26 +08:00
outfile: 'tmp/spec.html'
}
},
externalVendor: {
src: 'test/fixtures/externalVendor/src/**/*.js',
options: {
specs: 'test/fixtures/externalVendor/spec/**/*.js',
vendor: 'http://code.jquery.com/jquery-1.10.1.min.js'
}
},
customTemplate: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
2013-06-16 00:38:39 +08:00
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
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');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-internal');
grunt.registerTask('test', ['jshint', 'jasmine', 'nodeunit']);
grunt.registerTask('default', ['test', 'build-contrib']);
2012-11-02 13:03:09 +08:00
};