forked from melonjs/melonJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
75 lines (60 loc) · 2.18 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
module.exports = function(config) {
var sourceFiles = require("./sourceFiles.json");
var testSpecs = 'tests/spec/**/*.js';
var files = sourceFiles.concat("tests/helper/helper-spec.js").concat(testSpecs);
var files = files.concat([{pattern: 'tests/data/**/*', watched: false, included: false, served: true}]);
config.set({
basePath: '',
frameworks: ['jasmine'],
//all js files needed for tests to run order matters!
files: files,
//Note that instrumented js files are very inconvenient for debugging purpose, so consider having separate launch profile without instrumentation for debugging purposes
preprocessors: {
'./src/**/*.js': 'coverage',
},
reporters: ['nyan', 'coverage', 'htmlDetailed'],
// reporter options
nyanReporter: {
// suppress the error report at the end of the test run
suppressErrorReport: false, // default is false
// suppress the red background on errors in the error
// report at the end of the test run
suppressErrorHighlighting: false, // default is false
// increase the number of rainbow lines displayed
// enforced min = 4, enforced max = terminal height - 1
numberOfRainbowLines: 4, // default is 4
// only render the graphic after all tests have finished.
// This is ideal for using this reporter in a continuous
// integration environment.
renderOnRunCompleteOnly: false // default is false
},
htmlDetailed: {
dir: 'build/reports/karma',
splitResults: true,
useHostedBootstrap: true,
autoReload: false
},
coverageReporter: {
dir: 'build/reports/coverage',
reporters: [
{type: 'html', subdir: 'report-html'}
]
},
proxies: {
"/tests/": "/base/tests/"
},
// This is the new content for your travis-ci configuration test
// Custom launcher for Travis-CI
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
singleRun: true
});
if(process.env.TRAVIS){
config.browsers = ['Chrome_travis_ci'];
config.nyanReporter.renderOnRunCompleteOnly = true;
}
}