-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarma.conf.js
81 lines (59 loc) · 2.11 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
module.exports = function(config) {
'use strict';
var configuration = {
// base path, that will be used to resolve files and exclude
basePath: './',
frameworks: ['jasmine'],
files: [
'bower_components/jquery/dist/jquery.min.js',
'bower_components/lodash/dist/lodash.min.js',
'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
'bower_components/vissense/dist/vissense.min.js',
'dist/vissense-percentage-time-test.js',
'spec/**/*.js',
// fixtures
{pattern: 'spec/**/*.html', watched: true, served: true, included: false}
],
exclude: [
],
reporters: ['progress', 'coverage'],
port: 3000,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
//browsers: ['PhantomJS', 'Chrome', 'Firefox', 'IE', 'Opera'],
browsers: ['PhantomJS', 'Chrome', 'Firefox'],
customLaunchers: {
Chrome_without_security: {
base: 'Chrome',
flags: ['--disable-web-security']
},
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
preprocessors: {
'dist/vissense-percentage-time-test.js': ['coverage']
},
coverageReporter: {
reporters:[
{type: 'lcov', dir:'dist/coverage/'}
]
},
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
// if true, it capture browsers, run tests and exit
singleRun: true
};
if(process.env.TRAVIS){
configuration.browsers = ['PhantomJS', 'Firefox', 'Chrome_travis_ci'];
}
if(process.platform === 'win32') {
// @link https://github.com/karma-runner/karma-phantomjs-launcher/issues/27
// @link https://github.com/karma-runner/karma/issues/931
configuration.browsers.splice(configuration.browsers.indexOf('PhantomJS'), 1);
configuration.browsers.push('IE');
}
config.set(configuration);
};