-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
102 lines (98 loc) · 2.27 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
module.exports = function(grunt) {
var customLaunchers1 = {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome'
},
'SL_Firefox': {
base: 'SauceLabs',
browserName: 'firefox'
},
'SL_Opera': {
base: 'SauceLabs',
browserName: 'opera'
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.9',
version: '7'
}
};
var customLaunchers2 = {
// Now karma doesn't work on IE6.
// @see https://github.com/karma-runner/karma/issues/983
// 'SL_IE_6': {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// platform: 'Windows XP',
// version: '6'
// },
'SL_IE_7': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows XP',
version: '7'
},
'SL_IE_8': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows XP',
version: '8'
}
};
var customLaunchers3 = {
'SL_IE_9': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 2008',
version: '9'
},
'SL_IE_10': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 2012',
version: '10'
},
'SL_IE_11': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
}
};
grunt.initConfig({
karma: {
unit: {
configFile: 'karma.conf.js',
options: {
singleRun: true
}
},
ci1: {
configFile: 'karma.conf-ci.js',
options: {
customLaunchers: customLaunchers1,
browsers: Object.keys(customLaunchers1)
}
},
ci2: {
configFile: 'karma.conf-ci.js',
options: {
customLaunchers: customLaunchers2,
browsers: Object.keys(customLaunchers2)
}
},
ci3: {
configFile: 'karma.conf-ci.js',
options: {
customLaunchers: customLaunchers3,
browsers: Object.keys(customLaunchers3)
}
}
}
});
grunt.loadNpmTasks('grunt-karma');
grunt.registerTask('test', ['karma:unit']);
grunt.registerTask('ci', ['karma:ci1', 'karma:ci2', 'karma:ci3']);
};