2021-07-14 03:21:03 +00:00
|
|
|
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
|
|
|
|
2021-07-14 01:40:15 +00:00
|
|
|
module.exports = function (config) {
|
|
|
|
config.set({
|
|
|
|
frameworks: ['mocha', 'karma-typescript'],
|
2021-07-14 11:11:01 +00:00
|
|
|
files: ['src/lib/**/*.ts', 'src/proto/**/*.ts'],
|
2021-07-14 01:40:15 +00:00
|
|
|
preprocessors: {
|
|
|
|
'**/*.ts': ['karma-typescript'],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
require('karma-mocha'),
|
|
|
|
require('karma-typescript'),
|
|
|
|
require('karma-chrome-launcher'),
|
|
|
|
],
|
|
|
|
reporters: ['progress', 'karma-typescript'],
|
2021-07-14 05:17:16 +00:00
|
|
|
browsers: ['ChromeHeadless'],
|
2021-07-14 01:40:15 +00:00
|
|
|
singleRun: true,
|
|
|
|
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,
|
|
|
|
},
|
2021-07-15 01:10:19 +00:00
|
|
|
tsconfig: './tsconfig.json',
|
|
|
|
compilerOptions: {
|
|
|
|
noEmit: false,
|
|
|
|
},
|
|
|
|
include: {
|
|
|
|
mode: 'replace',
|
|
|
|
values: ['src/lib/**/*.ts', 'src/proto/**/*.ts'],
|
|
|
|
},
|
|
|
|
exclude: {
|
|
|
|
mode: 'replace',
|
|
|
|
values: ['node_modules/**'],
|
|
|
|
},
|
2021-07-14 01:40:15 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|