-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathtest.js
45 lines (35 loc) · 981 Bytes
/
test.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
var argv = require('optimist').argv;
exports.getBrowsers = function() {
var browsers = ['PhantomJS'];
if (argv.hasOwnProperty('ff')) {
browsers.push('Firefox');
}
if (argv.hasOwnProperty('chrome')) {
browsers.push('Chrome');
}
if (argv.hasOwnProperty('opera')) {
browsers.push('Opera');
}
if (argv.hasOwnProperty('safari')) {
browsers.push('Safari');
}
if (argv.hasOwnProperty('ie')) {
browsers.push('IE');
}
return browsers;
};
exports.getReporters = function(isDebug) {
var reporters = isDebug ? ['mocha'] : ['dots'];
reporters.push('coverage');
if (argv.hasOwnProperty('reporters')) {
reporters = argv.reporters.split(',');
}
return reporters;
};
exports.getJunitReporter = function() {
var junitReporter = {};
if (argv.hasOwnProperty('junitOutput')) {
junitReporter['outputFile'] = argv.junitOutput;
}
return junitReporter;
};