forked from ExtensionEngine/tailor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
56 lines (45 loc) · 1.32 KB
/
karma.conf.js
File metadata and controls
56 lines (45 loc) · 1.32 KB
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
const projectRoot = require('./config/client/helpers/projectRoot');
const webpackConfig = require('./config/client/webpack/test.js');
const CLIENT_TEST_PATH = projectRoot('client', 'test', 'unit', 'specs');
module.exports = function (config) {
config.set({
// Base path used to resolve all defined patterns (files, exclude etc.)
basePath: CLIENT_TEST_PATH,
// List of browsers to launch and capture
browsers: ['PhantomJS'],
// List of frameworks used for testing
frameworks: ['mocha', 'sinon-chai'],
// List of additional reporters
reporters: ['spec', 'coverage'],
// List of files / patterns to execute
files: [
{ pattern: '*.spec.js', watched: false }
],
// List of preprocessors to apply
preprocessors: {
'*.spec.js': ['webpack', 'sourcemap']
},
// Run only once instead of watching
singleRun: true,
// Use base webpack config
webpack: webpackConfig,
// Apply webpack middleware
webpackMiddleware: {
noInfo: true
},
// Coverage config, target dir etc.
coverageReporter: {
dir: projectRoot('client', 'test', 'unit', 'coverage'),
reporters: [
{
type: 'lcov',
dir: 'coverage',
subdir: 'lcov'
},
{
type: 'text-summary'
}
]
}
});
};