2022-02-04 03:12:00 +00:00
|
|
|
process.env.CHROME_BIN = require("puppeteer").executablePath();
|
2021-07-14 03:21:03 +00:00
|
|
|
|
2021-07-14 01:40:15 +00:00
|
|
|
module.exports = function (config) {
|
|
|
|
config.set({
|
2022-02-04 03:12:00 +00:00
|
|
|
frameworks: ["mocha", "karma-typescript"],
|
|
|
|
files: ["src/lib/**/*.ts", "src/proto/**/*.ts"],
|
2021-07-14 01:40:15 +00:00
|
|
|
preprocessors: {
|
2022-02-04 03:12:00 +00:00
|
|
|
"**/*.ts": ["karma-typescript", "env"],
|
2021-07-14 01:40:15 +00:00
|
|
|
},
|
2022-02-04 03:12:00 +00:00
|
|
|
envPreprocessor: ["CI"],
|
2021-07-14 01:40:15 +00:00
|
|
|
plugins: [
|
2022-02-04 03:12:00 +00:00
|
|
|
require("karma-mocha"),
|
|
|
|
require("karma-typescript"),
|
|
|
|
require("karma-chrome-launcher"),
|
|
|
|
require("karma-env-preprocessor"),
|
2021-07-14 01:40:15 +00:00
|
|
|
],
|
2022-02-04 03:12:00 +00:00
|
|
|
reporters: ["progress", "karma-typescript"],
|
|
|
|
browsers: ["ChromeHeadless"],
|
2021-07-14 01:40:15 +00:00
|
|
|
singleRun: true,
|
2021-12-20 07:21:21 +00:00
|
|
|
client: {
|
|
|
|
mocha: {
|
|
|
|
timeout: 6000, // Default is 2s
|
|
|
|
},
|
|
|
|
},
|
2021-07-14 01:40:15 +00:00
|
|
|
karmaTypescriptConfig: {
|
2021-07-14 03:03:57 +00:00
|
|
|
bundlerOptions: {
|
2021-09-24 05:25:37 +00:00
|
|
|
entrypoints: /^.*[^(node)]\.spec\.ts$/,
|
2021-07-14 03:03:57 +00:00
|
|
|
},
|
2021-07-14 01:40:15 +00:00
|
|
|
coverageOptions: {
|
|
|
|
instrumentation: false,
|
|
|
|
},
|
2022-02-04 03:12:00 +00:00
|
|
|
tsconfig: "./tsconfig.json",
|
2021-07-15 01:10:19 +00:00
|
|
|
compilerOptions: {
|
|
|
|
noEmit: false,
|
|
|
|
},
|
|
|
|
include: {
|
2022-02-04 03:12:00 +00:00
|
|
|
mode: "replace",
|
|
|
|
values: ["src/lib/**/*.ts", "src/proto/**/*.ts"],
|
2021-07-15 01:10:19 +00:00
|
|
|
},
|
|
|
|
exclude: {
|
2022-02-04 03:12:00 +00:00
|
|
|
mode: "replace",
|
|
|
|
values: ["node_modules/**"],
|
2021-07-15 01:10:19 +00:00
|
|
|
},
|
2021-07-14 01:40:15 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|