forked from openannotation/xpath-range
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
92 lines (87 loc) · 2.32 KB
/
karma.conf.js
File metadata and controls
92 lines (87 loc) · 2.32 KB
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
var babelify = require('babelify').configure({loose: 'all'})
var isparta = require('isparta')
var istanbul = require('browserify-istanbul')({
instrumenter: isparta,
instrumenterConfig: {babel: {loose: 'all'}}
})
module.exports = function(config) {
config.set({
basePath: 'test',
browsers: ['PhantomJS'],
browserify: {debug: true, transform: [babelify]},
frameworks: ['browserify', 'fixture', 'mocha'],
files: [
'adapter.js',
'spec/fixtures/*.html',
'spec/*.js'
],
preprocessors: {
'**/*.js': ['browserify'],
'**/*.html': ['html2js']
},
reporters: ['progress', 'saucelabs'],
sauceLabs: {testName: 'XPath Range test'},
customLaunchers: {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome',
version: '41'
},
'SL_Firefox': {
base: 'SauceLabs',
browserName: 'firefox',
version: '36'
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.10',
version: '8'
},
'SL_IE_8': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '8'
},
'SL_IE_9': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '9'
},
'SL_IE_10': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8',
version: '10'
},
'SL_IE_11': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
}
}
})
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.npm_config_coverage) config.set({
browserify: {debug: true, transform: [istanbul, babelify]},
coverageReporter: {
reporters: [
{'type': 'lcov', 'dir': '../coverage'},
{'type': 'text'}
]
},
reporters: ['progress', 'saucelabs', 'coverage', 'coveralls']
})
if (process.env.TRAVIS) config.set({
browsers: [process.env.BROWSER]
})
}