summaryrefslogtreecommitdiff
path: root/web-ui/webpack.test.config.js
diff options
context:
space:
mode:
authorAnike Arni <aarni@thoughtworks.com>2017-02-03 14:12:46 -0200
committerAnike Arni <aarni@thoughtworks.com>2017-02-03 14:14:29 -0200
commit2a0c02295ac6b3a21047e08a0174361003f02736 (patch)
tree2b76bc62af2e3930e624957ee9b05383db934810 /web-ui/webpack.test.config.js
parent16ce2be7e2a7496cedfe74bf27c72878941072cf (diff)
[#922] Move new js tests to mocha
We decided to move to mocha because it has more support for node testing with webpack (no need for browser). Since we're moving to React, we don't need the browser for our unit tests. With @tayanefernandes
Diffstat (limited to 'web-ui/webpack.test.config.js')
-rw-r--r--web-ui/webpack.test.config.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/web-ui/webpack.test.config.js b/web-ui/webpack.test.config.js
new file mode 100644
index 00000000..d3b245fc
--- /dev/null
+++ b/web-ui/webpack.test.config.js
@@ -0,0 +1,34 @@
+var path = require('path');
+var webpack = require('webpack');
+var copyWebpack = require('./config/copy-webpack');
+var aliases = require('./config/alias-webpack');
+
+module.exports = {
+ resolve: {
+ alias: aliases,
+ extensions: ['', '.js']
+ },
+ externals: {
+ 'react/lib/ExecutionEnvironment': true,
+ 'react/addons': true,
+ 'react/lib/ReactContext': 'window'
+ },
+ module: {
+ loaders: [
+ {
+ test: /\.js$/,
+ exclude: /(node_modules|bower_components)/,
+ loader: 'babel',
+ query: { presets: ['es2015', 'react']}
+ },
+ {
+ test: /\.scss|css$/,
+ loader: "css-loader!sass-loader"
+ },
+ {
+ test: /\.json$/,
+ loader: "json-loader"
+ }
+ ]
+ }
+}