forked from loomnetwork/loom-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.e2e.test.config.js
53 lines (51 loc) · 1.17 KB
/
webpack.e2e.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// This config is used to run tests in the browser.
const path = require('path');
const WebpackTapeRun = require('webpack-tape-run');
const WebpackDotEnv = require('dotenv-webpack');
module.exports = {
mode: 'production',
entry: './dist/tests/e2e_tests.js',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'browser_e2e_tests.js',
libraryTarget: 'umd',
globalObject: 'this',
// libraryExport: 'default',
library: 'loom_e2e_tests'
},
node: {
fs: 'empty',
crypto: true,
util: true,
stream: true,
path: 'empty',
},
externals: {
shelljs: 'commonjs shelljs',
},
module: {
rules: [
{
test: /\.(js)$/,
exclude: /(node_modules)/,
use: 'babel-loader'
}
]
},
plugins: [
new WebpackDotEnv({
path: './.env.test',
safe: './.env.test.example'
}),
// Be default tests will run in Electron, but can use other browsers too,
// see https://github.com/syarul/webpack-tape-run for plugin settings.
new WebpackTapeRun({
reporter: "tap-spec"
})
],
// silence irrelevant messages
performance: {
hints: false
},
stats: 'errors-only'
};