-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.test.config.js
34 lines (33 loc) · 1.07 KB
/
webpack.test.config.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
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: './tests/run-tests.js',
output: {
filename: 'tests.js',
path: path.resolve(__dirname, './dist'),
publicPath: '/'
},
mode: 'development',
devtool: 'source-map',
resolve: {
modules: [
path.resolve(__dirname, './node_modules')
]
},
devServer: {
hot: true,
port: 5555,
liveReload: true,
clientLogLevel: 'none'
},
plugins: [
new webpack.DefinePlugin({
'process.env.TEST_URL': JSON.stringify(process.env.TEST_URL || 'http://localhost:5984'),
'process.env.TEST_ADMIN_USERNAME': JSON.stringify(process.env.TEST_USERNAME || 'admin'),
'process.env.TEST_ADMIN_PASSWORD': JSON.stringify(process.env.TEST_PASSWORD || 'admin'),
'process.env.TEST_USERNAME': JSON.stringify(process.env.TEST_USERNAME || 'test'),
'process.env.TEST_PASSWORD': JSON.stringify(process.env.TEST_PASSWORD || 'test'),
'process.env.TEST_DATABASE_NAME': JSON.stringify(process.env.TEST_DATABASE_NAME || 'lookout-integration-test')
})
]
}