forked from github-tools/github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
73 lines (62 loc) · 1.5 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
module.exports = function (config) {
'use strict';
var configuration = {
client: {
captureConsole: true,
mocha: {
timeout: 10000,
ui: 'bdd'
}
},
concurrency: 2,
singleRun: true,
autoWatch: false,
frameworks: [
'browserify',
'mocha',
'chai'
],
browsers: ['PhantomJS'],
browserify: {
debug: true,
transform: ['browserify-istanbul']
},
phantomjsLauncher: {
debug: true,
options: {
settings: {
webSecurityEnabled: false
}
}
},
coverageReporter: {
reporters: [
{
type: 'lcov'
},
{
type: 'text-summary'
}
],
instrumenterOptions: {
istanbul: {
noCompact: true
}
}
}
};
// This block is needed to execute Chrome on Travis
// If you ever plan to use Chrome and Travis, you can keep it
// If not, you can safely remove it
// https://github.com/karma-runner/karma/issues/1144#issuecomment-53633076
if (configuration.browsers[0] === 'Chrome' && process.env.TRAVIS) {
configuration.customLaunchers = {
'chrome-travis-ci': {
base: 'Chrome',
flags: ['--no-sandbox']
}
};
configuration.browsers = ['chrome-travis-ci'];
}
config.set(configuration);
};