-
-
Notifications
You must be signed in to change notification settings - Fork 98
/
karma.conf.js
55 lines (52 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
// Karma configuration
// Generated on Tue Apr 07 2015 23:14:35 GMT-0600 (MDT)
const DEBUG = process.argv.find(argv => argv === '--debug');
module.exports = function (config) {
config.set({
basePath: '',
singleRun: false,
autoWatch: true,
frameworks: ['mocha', 'chai', 'sinon'],
files: [
// setup
{ pattern: 'test/setup.js', type: 'module' },
// assets
{ pattern: 'test/imgs/**/*.*', included: false, served: true },
{ pattern: 'test/audio/**/*.*', included: false, served: true },
{ pattern: 'test/data/**/*.*', included: false, served: true },
{ pattern: 'src/*.js', type: 'module', included: false },
{ pattern: 'test/utils.js', type: 'module', included: false },
{ pattern: 'test/unit/*.spec.js', type: 'module' },
{ pattern: 'test/integration/*.spec.js', type: 'module' }
],
browsers: [DEBUG ? 'Chrome' : 'ChromeHeadless'],
proxies: {
'/imgs': '/base/test/imgs',
'/audio': '/base/test/audio',
'/data': '/base/test/data'
},
reporters: ['mocha', 'coverage'],
preprocessors: {
'src/**/*.js': ['coverage']
},
coverageReporter: {
check: {
emitWarning: false,
global: {
statements: 95,
branches: 95,
functions: 95,
lines: 95
}
},
dir: 'coverage/',
reporters: [{ type: 'html' }, { type: 'text-summary' }]
},
client: {
mocha: {
timeout: 4000,
reporter: 'html'
}
}
});
};