-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkarma.conf.js
36 lines (35 loc) · 959 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
/* eslint-disable import/no-extraneous-dependencies */
const defaultSettings = require('@open-wc/testing-karma/default-settings.js');
const merge = require('webpack-merge');
module.exports = config => {
config.set(
merge(defaultSettings(config), {
files: [
// allows running single tests with the --grep flag
config.grep ? config.grep : 'src/**/*.test.js',
],
webpack: {
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
},
{
test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/,
use: {
loader: 'file-loader',
options: {
name: '[path][name].[ext]'
}
}
},
]
}
}
// your custom config
}),
);
return config;
};