-
Notifications
You must be signed in to change notification settings - Fork 6
/
karma.conf.js
60 lines (60 loc) · 1.3 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
const webpack = require('./webpack.config.js')
const browsers = !process.env.CI ? ['Chrome'] : ['ChromeHeadlessNoSandbox']
const customLaunchers = !process.env.CI ? {} : {
// Workaround for permissions issues running Chrome with sandbox in docker
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
}
module.exports = function (config) {
config.set({
basePath: '.',
frameworks: ['mocha', 'chai'],
preprocessors: {
'tests/*-spec.js': ['webpack'],
'tests/**/*-spec.js': ['webpack']
},
files: [
'./tests/**/*-spec.js',
{
pattern: 'tests/fixtures/*.mp4',
included: false,
served: true,
watched: false
},
{
pattern: 'tests/fixtures/style.css',
included: false,
served: true,
watched: false
}
],
browsers,
customLaunchers,
webpack,
reporters: ['progress', 'coverage'],
coverageReporter: {
dir: 'coverage',
reporters: [
{
type: 'lcov',
subdir: 'report-lcov'
}
]
},
webpackMiddleware: {
noInfo: true,
stats: {
chunks: false
}
},
client: {
mocha: {
ui: 'bdd',
reporter: 'html'
}
},
singleRun: !!process.env.CI
})
}