forked from waku-org/js-waku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
46 lines (45 loc) · 1.13 KB
/
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
42
43
44
45
46
process.env.CHROME_BIN = require("puppeteer").executablePath();
module.exports = function (config) {
config.set({
frameworks: ["mocha", "karma-typescript"],
files: ["src/lib/**/*.ts", "src/proto/**/*.ts"],
preprocessors: {
"**/*.ts": ["karma-typescript", "env"],
},
envPreprocessor: ["CI"],
plugins: [
require("karma-mocha"),
require("karma-typescript"),
require("karma-chrome-launcher"),
require("karma-env-preprocessor"),
],
reporters: ["progress", "karma-typescript"],
browsers: ["ChromeHeadless"],
singleRun: true,
client: {
mocha: {
timeout: 6000, // Default is 2s
},
},
karmaTypescriptConfig: {
bundlerOptions: {
entrypoints: /^.*[^(node)]\.spec\.ts$/,
},
coverageOptions: {
instrumentation: false,
},
tsconfig: "./tsconfig.json",
compilerOptions: {
noEmit: false,
},
include: {
mode: "replace",
values: ["src/lib/**/*.ts", "src/proto/**/*.ts"],
},
exclude: {
mode: "replace",
values: ["node_modules/**"],
},
},
});
};