forked from kbukum/react-es6-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.test.js
58 lines (50 loc) · 1.39 KB
/
webpack.config.test.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
46
47
48
49
50
51
52
53
54
55
56
"use strict";
/**
* import common webpack settings
*/
const commonSettings = require("./webpack.config.common.js");
/**
* @link https://webpack.github.io/docs/configuration.html#cache
* Cache generated modules and chunks to improve performance for multiple incremental builds.
This is enabled by default in watch mode.
* @type {boolean}
*/
commonSettings.cache = true;
/**
* @link https://webpack.github.io/docs/configuration.html#debug
* Switch loaders to debug mode.
* @type {boolean}
*/
commonSettings.debug = true;
/**
* @link https://webpack.github.io/docs/configuration.html#devtool
* Choose a developer tool to enhance debugging.
* source-map - A SourceMap is emitted. See also output.sourceMapFilename.
* @type {string}
*/
commonSettings.devtool = "eval";
module.exports = function (config) {
config.set({
browsers: ["PhantomJS"],
singleRun: true,
plugins: [
"karma-webpack",
"karma-mocha",
"karma-phantomjs-launcher",
"karma-mocha-reporter",
"karma-bamboo-reporter"
],
frameworks: ["mocha"],
files: [
"__test__/**/*.spec.js"
],
preprocessors: {
"__test__/**/*.spec.js": ["webpack"]
},
reporters: ["mocha", "bamboo"],
webpack: commonSettings,
webpackServer: {
noInfo: true
}
});
};