forked from firefox-devtools/debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
42 lines (37 loc) · 1006 Bytes
/
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
"use strict";
var webpackConfig = require("./webpack.config.js");
webpackConfig.entry = {};
// Compile with babel to support older browsers. We may be able to
// remove this if we can use latest versions that have enough ES6
// support.
webpackConfig.module.loaders.forEach(spec => {
if(spec.isJavaScriptLoader) {
const idx = spec.loaders.findIndex(loader => loader.includes("babel"));
spec.loaders[idx] += "&presets[]=es2015&plugins[]=transform-runtime"
}
});
module.exports = function(config) {
config.set({
basePath: "",
frameworks: ["mocha"],
files: [
"./public/js/**/tests/*.js"
],
exclude: [],
reporters: ["progress"],
browsers: ["Firefox", "Chrome"],
port: 8002,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
singleRun: false,
concurrency: Infinity,
preprocessors: {
"./public/js/**/tests/*": ["webpack"]
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
}
});
};