-
Notifications
You must be signed in to change notification settings - Fork 15
/
karma.conf.js
61 lines (58 loc) · 1.51 KB
/
karma.conf.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
module.exports = function(config) {
config.set({
browsers: ['PhantomJS'],
browserify: {debug: true, transform: ['babelify']},
frameworks: ['browserify', 'fixture', 'mocha'],
files: [
'test/*.js',
'test/fixtures/*.html'
],
preprocessors: {
'test/*.js': ['browserify'],
'test/fixtures/*.html': ['html2js']
},
reporters: ['progress', 'coverage', 'saucelabs'],
coverageReporter: {
reporters: [
{type: 'html', subdir: '.'},
{type: 'json', subdir: '.'},
{type: 'lcovonly', subdir: '.'},
{type: 'text', subdir: '.'}
]
},
sauceLabs: {testName: 'XPath Range test'},
customLaunchers: {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome',
},
'SL_Edge': {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
},
'SL_Firefox': {
base: 'SauceLabs',
browserName: 'firefox',
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
},
'SL_IE_8': {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '8'
}
}
})
try {
var sauceCredentials = require('./sauce.json')
process.env.SAUCE_USERNAME = sauceCredentials.username
process.env.SAUCE_ACCESS_KEY = sauceCredentials.accessKey
} catch (e) {
console.log('Note: run `git-crypt unlock` to use Sauce Labs credentials.')
}
if (process.env.TRAVIS) config.set({
browsers: [process.env.BROWSER]
})
}