-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
73 lines (54 loc) · 2.07 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
const karmaConfig = {
basePath: '',
frameworks: ['qunit'],
proxies: {
'/dist/brandable_css/': '/base/public/dist/brandable_css/'
},
exclude: [],
// 'dots', 'progress', 'junit', 'growl', 'coverage', 'spec'
reporters: ['progress', 'coverage'],
// enable the verbose reporter if you want to have more information of where/how specs fail
// reporters: ['verbose'],
coverageReporter: {
type: 'html',
dir: 'coverage-js/',
subdir: '.'
},
port: 9876,
colors: true,
autoWatch: true,
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera (has to be installed with `npm install karma-opera-launcher`)
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
// - PhantomJS
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
browsers: ['Chrome'],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
browserNoActivityTimeout: 2000000,
reportSlowerThan: 1000,
// normally QUnit wraps each test in a try/catch so a single spec failing
// doesn't stop the whole test suite. In dev, if you want to click the
// "pause on exception" thing in chrome and have it stop on your failing test, enable notrycatch
// client: {qunit: {notrycatch: true}},
// by default we keep the browser open so it refreshes with any changes
// but in `npm test` (which is what jenkins CI runs) we override it so
// it just runs once and then exits.
singleRun: false,
files: [
{pattern: 'spec/javascripts/webpack_spec_index.js', included: true, served: true},
{pattern: 'spec/javascripts/fixtures/*', included: false, served: true},
{pattern: 'public/dist/brandable_css/**/*.css', included: false, served: true},
],
preprocessors: {
'spec/javascripts/webpack_spec_index.js': ['webpack']
},
webpack: require('./webpack.test.config'),
}
module.exports = function (config) {
// config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
karmaConfig.logLevel = config.LOG_INFO
config.set(karmaConfig)
}