-
Notifications
You must be signed in to change notification settings - Fork 77
/
karma.conf.js
78 lines (76 loc) · 1.73 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
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: ['sinon', 'chai', 'mocha'],
plugins: [
'karma-sinon',
'karma-mocha',
'karma-chai',
'karma-phantomjs-launcher',
'karma-coverage'
],
autoWatch: false,
browserNoActivityTimeout: 30000,
browsers: browsers,
files: [
'bower_components/angular-1.3.2/angular.js',
'bower_components/angular-mocks-1.3.2/angular-mocks.js',
'node_modules/babel-polyfill/dist/polyfill.js',
'node_modules/js-data/dist/js-data.js',
'dist/js-data-angular.js',
'karma.start.js',
'test/**/*.js'
],
reporters: ['dots', 'coverage'],
preprocessors: {
'dist/js-data-angular.js': ['coverage']
},
coverageReporter: {
type: 'lcov',
dir: 'coverage/'
},
port: 9876,
runnerPort: 9100,
colors: true,
logLevel: config.LOG_INFO,
captureTimeout: 30000,
singleRun: true
})
}