-
Notifications
You must be signed in to change notification settings - Fork 15
/
karma.conf.js
82 lines (79 loc) · 2.05 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
'use strict'
var customLaunchers = {
bs_ie9_windows7: {
base: 'BrowserStack',
browser: 'ie',
browser_version: '9.0',
os: 'Windows',
os_version: '7'
},
bs_safari7_osxmavericks: {
base: 'BrowserStack',
browser: 'safari',
browser_version: '7.1',
os: 'OS X',
os_version: 'Mavericks'
},
bs_firefox41_windows7: {
base: 'BrowserStack',
browser: 'firefox',
browser_version: '41.0',
os: 'Windows',
os_version: '7'
},
bs_chrome46_windows7: {
base: 'BrowserStack',
browser: 'chrome',
browser_version: '46.0',
os: 'Windows',
os_version: '7'
}
}
var browsers = ['PhantomJS']
if (process.env.BROWSERSTACK_USERNAME && process.env.BROWSERSTACK_ACCESS_KEY) {
browsers = browsers.concat(Object.keys(customLaunchers))
}
module.exports = function (config) {
config.set({
basePath: './',
frameworks: ['chai', 'mocha', 'sinon'],
plugins: [
'karma-chai',
'karma-mocha',
'karma-sinon',
'karma-phantomjs-launcher',
'karma-browserstack-launcher'
],
client: {
mocha: {
// reporter: 'html', // change Karma's debug.html to the mocha web reporter
timeout: 10000 // had to increase the delay due to timeouts with firebase
}
},
autoWatch: false,
autoWatchBatchDelay: 4000,
browsers: browsers,
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
'node_modules/js-data/dist/js-data.js',
'node_modules/firebase/firebase.js',
'dist/js-data-firebase.js',
'node_modules/js-data-adapter/dist/js-data-adapter-tests.js',
process.env.CONFIG_FILENAME || 'config.js', // You must create this file
'karma.start.js'
],
reporters: ['dots'],
browserStack: {
username: process.env.BROWSERSTACK_USERNAME,
accessKey: process.env.BROWSERSTACK_ACCESS_KEY
},
customLaunchers: customLaunchers,
browserNoActivityTimeout: 90000,
port: 9876,
runnerPort: 9100,
colors: true,
logLevel: config.LOG_INFO,
captureTimeout: 90000,
singleRun: true
})
}