js-waku/karma.conf.js

40 lines
996 B
JavaScript
Raw Normal View History

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'],
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: {
bundlerOptions: {
entrypoints: /^.*[^(node)]\.spec\.ts$/,
},
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
},
});
};