-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathkarma.conf.js
101 lines (98 loc) · 2.3 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
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
var browsers = ['PhantomJS']
var customLaunchers = {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 10',
version: 'latest'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Windows 10',
version: 'latest'
},
sl_safari_9: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: '9.0'
},
sl_edge: {
base: 'SauceLabs',
browserName: 'microsoftedge',
platform: 'Windows 10',
version: 'latest'
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
},
sl_ie_10: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 2012',
version: '10'
},
sl_ie_9: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 2008',
version: '9'
},
sl_android_5: {
base: 'SauceLabs',
browserName: 'android',
platform: 'Linux',
version: '5.1'
}
}
if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
browsers = browsers.concat(Object.keys(customLaunchers))
}
module.exports = function (config) {
config.set({
basePath: './',
frameworks: ['sinon', 'chai', 'mocha'],
plugins: [
'karma-sinon',
'karma-mocha',
'karma-chai',
'karma-phantomjs-launcher',
'karma-sauce-launcher'
],
autoWatch: false,
browsers: browsers,
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
'node_modules/js-data/dist/js-data.js',
'dist/js-data-http.js',
'karma.start.js',
'test/*.test.js'
],
sauceLabs: {
testName: 'JSDataHttp Tests',
public: 'public',
recordVideo: false,
recordScreenshots: false,
build: process.env.CIRCLE_BUILD_NUM ? ('circle-' + process.env.CIRCLE_BUILD_NUM) : ('local-' + new Date().getTime())
},
customLaunchers: customLaunchers,
reporters: ['dots'],
junitReporter: {
outputDir: process.env.CIRCLE_TEST_REPORTS || 'junit',
outputFile: undefined,
suite: 'js-data-http',
userBrowserName: false
},
port: 9876,
runnerPort: 9100,
colors: true,
logLevel: config.LOG_INFO,
browserNoActivityTimeout: 90000,
captureTimeout: 90000,
singleRun: true
})
}