-
Notifications
You must be signed in to change notification settings - Fork 14
/
Gruntfile.js
40 lines (32 loc) · 1.22 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var module = module;
//this keeps the module file from doing anything inside the jasmine tests.
//We could avoid this by making all the source be in a specific directory, but that would break backwards compatibility.
if (module) {
module.exports = function (grunt) {
'use strict';
var config, debug, environment, spec;
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('test', ['jshint','jasmine']);
grunt.registerTask('default', ['test']);
spec = grunt.option('spec') || '*';
config = grunt.file.readJSON('config.json');
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jasmine: {
dev: {
src: "./*.js",
options: {
vendor:["https://rally1.rallydev.com/apps/"+config.sdk+"/sdk-debug.js"],
template: 'test/specs.tmpl',
specs: "test/**/" + spec + "Spec.js",
helpers: []
}
}
},
jshint:{
all: ['test/**/*.js']
}
});
}
}