lion/karma.conf.js
2019-05-27 16:29:13 +02:00

34 lines
928 B
JavaScript

/* eslint-disable import/no-extraneous-dependencies */
const createDefaultConfig = require('@open-wc/testing-karma/default-config');
const merge = require('webpack-merge');
module.exports = config => {
config.set(
merge(createDefaultConfig(config), {
files: [
// runs all files ending with .test in the test folder,
// can be overwritten by passing a --grep flag. examples:
//
// npm run test -- --grep test/foo/bar.test.js
// npm run test -- --grep test/bar/*
{
pattern: config.grep ? config.grep : 'packages/*/test/**/*.test.js',
type: 'module',
},
],
// TODO: improve coverage
coverageIstanbulReporter: {
thresholds: {
global: {
statements: 80,
branches: 70,
functions: 70,
lines: 80,
},
},
},
}),
);
return config;
};