forked from microsoft/PowerBI-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma.conf.js
44 lines (42 loc) · 1.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
var argv = require('yargs').argv;
var browserName = 'PhantomJS';
if (argv.chrome) {
browserName = 'Chrome'
}
else if (argv.firefox) {
browserName = 'Firefox'
}
module.exports = function (config) {
config.set({
frameworks: ['jasmine'],
files: [
'./node_modules/jquery/dist/jquery.js',
'./node_modules/es6-promise/dist/es6-promise.js',
'./tmp/**/*.js',
{ pattern: './test/**/*.html', served: true, included: false }
],
exclude: [],
reporters: argv.debug ? ['spec'] : ['spec', 'coverage'],
autoWatch: true,
browsers: [browserName],
plugins: [
'karma-firefox-launcher',
'karma-chrome-launcher',
'karma-jasmine',
'karma-spec-reporter',
'karma-phantomjs-launcher',
'karma-coverage'
],
preprocessors: { './tmp/**/*.js': ['coverage'] },
coverageReporter: {
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
logLevel: argv.debug ? config.LOG_DEBUG : config.LOG_INFO,
client: {
args: argv.logMessages ? ['logMessages'] : []
}
});
};