forked from aaronpowell/db.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
73 lines (63 loc) · 1.43 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* global module:false */
module.exports = function(grunt){
// Project configuration.
var saucekey = null;
if (process.env.TRAVIS_SECURE_ENV_VARS) {
saucekey = process.env.saucekey;
}
if (!saucekey) {
console.warn('Unable to load saurcelabs key');
}
grunt.initConfig({
jade: {
release: {
files: {
"tests/index.html": ["tests/views/index.jade"]
}
}
},
clean: ["tests/index.html"],
connect: {
server: {
options: {
base: ".",
port: 9999
}
}
},
'saucelabs-jasmine': {
all: {
options: {
username: 'aaronpowell',
key: saucekey,
testname: 'db.js',
tags: ['master'],
urls: ['http://127.0.0.1:9999/tests/index.html'],
browsers: [/*{
browserName: 'firefox',
platform: 'Windows 2012',
version: '17'
}, {
browserName: 'internet explorer',
platform: 'Windows 2012',
version: '10'
}, */{
browserName: 'chrome',
platform: 'Windows 2008'
}]
}
}
}
});
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.registerTask("forever", function(){
this.async();
});
var testJobs = ["clean", "jade", "connect"];
if (saucekey !== null) {
testJobs.push("saucelabs-jasmine");
}
grunt.registerTask('test', testJobs);
grunt.registerTask('default', 'test');
};