forked from wheresrhys/fetch-mock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
37 lines (37 loc) · 839 Bytes
/
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
module.exports = karma =>
karma.set({
port: 9876,
frameworks: ['mocha'],
files: [
'test/client.js',
{ pattern: 'test/fixtures/sw.js', served: true, included: false }
],
proxies: {
'/__sw.js': '/base/test/fixtures/sw.js',
// this just needs to be a 200 response, so can send any file
'/dummy-file.txt': '/base/test/fixtures/sw.js'
},
preprocessors: {
'test/**/*.js': ['webpack']
},
webpack: {
mode: 'development',
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
babelrc: false, // ignore any .babelrc in project & dependencies
cacheDirectory: true,
plugins: ['transform-runtime'],
presets: ['env']
}
}
]
}
},
reporters: ['mocha']
});