-
Notifications
You must be signed in to change notification settings - Fork 37
/
webpack.config.test.js
45 lines (44 loc) · 1.28 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
var path = require('path');
module.exports = {
entry: './test/main.js',
mode: 'development',
output: {
filename: './build/test-bundle.js'
},
node: {
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
},
module: {
rules: [
{
loader: "babel-loader",
include: [
path.resolve(__dirname, "tests")
],
options: {
presets: ["@babel/preset-env"],
}
},
{
test: /\.js$/,
use: {
loader: 'istanbul-instrumenter-loader',
options: { esModules: true }
},
exclude: [
// exclude so we don't test coverage of these files
// very hard to test them with pure JS anyway
/source\/js\/utils\/vanilla\.kinetic\.js/,
/source\/js\/utils\/dragscroll\.js/,
/source\/js\/plugins\/_filters\.js/,
/source\/js\/gesture-events\.js/
],
enforce: 'post',
include: path.resolve('source/js/')
}
]
},
};