UNPKG

1.01 kBJavaScriptView Raw
1module.exports = function (config) {
2 config.set({
3 frameworks: ['mocha', 'chai'],
4 reporters: ['karmaHTML', 'progress'],
5 client: {
6 karmaHTML: {
7 auto: false,
8 source: [{ src: '/test/child.html', tag: 'child' }]
9 }
10 },
11 files: [
12 { pattern: 'src/**/*.spec.js', watched: false },
13 { pattern: 'test/*.html', served: true },
14 {
15 pattern: 'src/**/!(*.spec).js',
16 watched: true,
17 served: true,
18 included: false
19 }
20 ],
21 preprocessors: {
22 'src/**/*.spec.js': ['webpack']
23 },
24 webpack: {},
25 webpackMiddleware: { stats: 'errors-only' },
26 babelPreprocessor: {
27 options: {
28 presets: ['env'],
29 sourceMap: 'inline'
30 }
31 },
32 port: 9876, // karma web server port
33 colors: true,
34 logLevel: config.LOG_INFO,
35 browsers: ['ChromeHeadless'],
36 autoWatch: true,
37 concurrency: Infinity,
38 proxies: {
39 '/html/': '/base/test/',
40 '/js/': '/base/src/'
41 }
42 });
43};