forked from FormidableLabs/ecology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
44 lines (41 loc) · 1.18 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
"use strict";
/*
* Karma Configuration: "full" version.
*
* This configuration runs a temporary `webpack-dev-server` and builds
* the test files one-off for just a single run. This is appropriate for a
* CI environment or if you're not otherwise running `npm run dev|hot`.
*/
var webpackCfg = require("./webpack.config.test");
module.exports = function (config) {
// Start with the "dev" (webpack-dev-server is already running) config
// and add in the webpack stuff.
require("./karma.conf.dev")(config);
// Overrides.
config.set({
preprocessors: {
"test/client/main.js": ["webpack"]
},
files: [
// Sinon has issues with webpack. Do global include.
"node_modules/sinon/pkg/sinon.js",
// Test bundle (created via local webpack-dev-server in this config).
"test/client/main.js"
],
webpack: webpackCfg,
webpackServer: {
port: 3002, // Choose a non-conflicting port (3000 app, 3001 test dev)
quiet: false,
noInfo: true,
stats: {
assets: false,
colors: true,
version: false,
hash: false,
timings: false,
chunks: false,
chunkModules: false
}
}
});
};