You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grunt-contrib-jasmine/Gruntfile.js

137 lines
3.5 KiB

12 years ago
/*
* grunt-contrib-jasmine
* http://gruntjs.com/
*
* Copyright (c) 2014 GruntJS Team
12 years ago
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
12 years ago
grunt.initConfig({
connect: {
return500: {
options: {
port: 9000,
middleware: function(connect, options) {
return [function(req, res, next){
res.statusCode = 500;
res.end();
}];
}
}
}
},
12 years ago
jshint: {
all: [
'Gruntfile.js',
'tasks/**/*.js'
12 years ago
],
options: {
jshintrc: '.jshintrc'
}
},
watch : {
dev : {
files : ['tasks/**/*'],
tasks : ['jasmine:pivotal:build']
}
},
jasmine: {
pivotal: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
junit: {
path: 'junit'
}
}
},
phantom_polyfills: {
src: 'test/fixtures/phantom-polyfills/src/**/*.js',
options : {
specs : 'test/fixtures/phantom-polyfills/spec/**/*.js',
}
},
consoleDisplayOptions: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
display: 'short',
11 years ago
summary: true,
}
},
consoleDisplayOptionsNone: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
display: 'none',
summary: true,
}
},
deepOutfile: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
specs: 'test/fixtures/pivotal/spec/*Spec.js',
helpers: 'test/fixtures/pivotal/spec/*Helper.js',
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'
}
},
// @todo: automate fail case here
// syntaxError: {
// src: 'test/fixtures/syntaxError/src/**/*.js',
// options: {
// specs: 'test/fixtures/syntaxError/spec/**/*.js'
// }
// },
customTemplate: {
src: 'test/fixtures/pivotal/src/**/*.js',
options: {
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
}
}
},
selfTest: {
options: {
specs:["test/selfTest/*.js"],
"--web-security": "no"
}
}
},
12 years ago
nodeunit: {
tasks: ['test/*_test.js']
}
});
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
12 years ago
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-internal');
grunt.loadNpmTasks('grunt-contrib-connect');
12 years ago
grunt.registerTask('test', ['connect:return500', 'jasmine', 'nodeunit']);
grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);
12 years ago
};