js-waku/karma.conf.js

40 lines
995 B
JavaScript

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'],
},
plugins: [
require('karma-mocha'),
require('karma-typescript'),
require('karma-chrome-launcher'),
],
reporters: ['progress', 'karma-typescript'],
browsers: ['ChromeHeadless'],
singleRun: true,
karmaTypescriptConfig: {
bundlerOptions: {
entrypoints: /.*\.browser\.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/**'],
},
},
});
};