-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathkarma.conf.js
45 lines (44 loc) · 1.14 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
const karmaMocha = require('karma-mocha');
const karmaMochaReporter = require('karma-mocha-reporter');
const karmaChai = require('karma-chai');
const karmaChromeLauncher = require('karma-chrome-launcher');
const karmaFirefoxLauncher = require('karma-firefox-launcher');
const karmaWebpack = require('karma-webpack');
const webpackConfig = require('./webpack.config');
module.exports = (config) => {
config.set({
frameworks: ['mocha', 'chai', 'webpack'],
files: [
'lib/test/karma/loader.js',
],
preprocessors: {
'lib/test/karma/loader.js': ['webpack'],
},
webpack: {
mode: 'development',
resolve: webpackConfig[0].resolve,
plugins: webpackConfig[0].plugins,
},
client: {
mocha: {
timeout: 5000,
},
},
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['ChromeHeadless', 'FirefoxHeadless'],
singleRun: false,
concurrency: Infinity,
plugins: [
karmaMocha,
karmaMochaReporter,
karmaChai,
karmaChromeLauncher,
karmaFirefoxLauncher,
karmaWebpack,
],
});
};