-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
48 lines (46 loc) · 1.34 KB
/
karma.conf.js
File metadata and controls
48 lines (46 loc) · 1.34 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
// The MIT License
// Copyright (C) 2017-Present Shota Matsuda
const pkg = require('./package.json')
const webpack = require('./webpack.config.test.js')
module.exports = function (config) {
config.set({
basePath: './',
plugins: [
require('karma-chrome-launcher'),
require('karma-coverage-istanbul-reporter'),
require('karma-mocha'),
require('karma-sourcemap-loader'),
require('karma-spec-reporter'),
require('karma-webpack')
],
frameworks: ['mocha'],
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
'node_modules/mocha/mocha.js',
'node_modules/chai/chai.js',
'node_modules/sinon/pkg/sinon.js',
'test/src/**/*.js',
{ pattern: 'test/data/**/*', included: false },
{ pattern: pkg.browser[pkg.main], included: false }
],
preprocessors: {
'test/src/**/*.js': ['webpack', 'sourcemap']
},
reporters: ['spec', 'coverage-istanbul'],
proxies: {
'/test/data/': '/base/test/data/',
'/node_modules/': '/base/node_modules/',
'/dist/': '/base/dist/'
},
coverageIstanbulReporter: {
reports: ['text', 'text-summary', 'lcov'],
dir: 'coverage/browser',
combineBrowserReports: true
},
webpack,
browsers: ['ChromeHeadless'],
singleRun: true,
autoWatch: false,
concurrency: Infinity
})
}