-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.js
41 lines (39 loc) · 1015 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
38
39
40
41
/* eslint-disable import/no-extraneous-dependencies */
const defaultSettings = require("@open-wc/testing-karma/default-settings.js");
const merge = require("webpack-merge");
const path = require("path");
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: [
{
exclude: /node_modules/,
test: /\.ts$/,
use: "ts-loader"
},
{
test: /\.scss$/,
use: [
"to-string-loader",
{
loader: "css-loader"
},
"sass-loader"
]
}
]
},
resolve: {
extensions: [".js", ".ts"]
}
}
})
);
return config;
};