-
Notifications
You must be signed in to change notification settings - Fork 5
/
karma.conf.js
68 lines (62 loc) · 1.58 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
module.exports = function (config) {
'use strict';
var configuration = {
frameworks: ['mocha'],
files: [
'bower_components/mocha/mocha.css',
'src/kairos.js',
'src/Lexicon.js',
'src/Engine.js',
'bower_components/assert/assert.js',
'bower_components/mocha/mocha.js',
'test/browser/kairos.js',
'test/browser/lexicon.js',
'test/browser/engine.js',
{
pattern: 'test/browser/fixture/*',
included: false,
served: true
}
],
proxies: {
'/fixture': '/base/test/fixture'
},
reporters: ['progress', 'coverage'],
preprocessors: {
'src/**/*.js': ['coverage']
},
coverageReporter: {
dir: 'coverage',
reporters: [
{type: 'lcovonly', subdir: '.', file: 'lcov.info'}
]
},
browsers: ['Chrome', 'Firefox', 'PhantomJS'],
plugins : [
'karma-jasmine',
'karma-mocha',
'karma-coverage',
'karma-phantomjs-launcher',
'karma-chrome-launcher',
'karma-firefox-launcher'
]
};
if (process.env.TRAVIS) {
//configuration.customLaunchers = {
// Chrome_travis_ci: {
// base: 'Chrome',
// flags: ['--no-sandbox']
// }
//};
configuration.browsers = ['Firefox'/*, 'PhantomJS', 'Chrome_travis_ci'*/];
}
if (process.env.C9_PROJECT) {
configuration.browsers = ['PhantomJS'];
}
if (process.env.IP && process.env.PORT) {
configuration.hostname = process.env.IP;
configuration.port = process.env.PORT
configuration.runnerPort = 0
}
config.set(configuration);
};