-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
37 lines (34 loc) · 897 Bytes
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const webpackConfig = require("./webpack.config");
const path = require('path');
const puppeteer = require('puppeteer');
process.env.CHROME_BIN = puppeteer.executablePath();
delete webpackConfig.entry
module.exports = (config) => {
config.set({
browsers: ["ChromeHeadless"],
frameworks: ["mocha", "sinon-chai"],
reporters: ["spec", 'coverage-istanbul'],
files: [
'test/jquery-3.5.1.min.js',
"test/index.ts"
],
preprocessors: {
"test/index.ts": ["webpack"],
},
mime: {
"text/x-typescript": ["ts", "tsx"],
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
coverageIstanbulReporter: {
reports: [ 'html', 'text-summary', 'lcovonly' ],
dir: path.join(__dirname, 'coverage'),
fixWebpackSourcePaths: true,
'report-config': {
html: { outdir: 'html' }
}
}
})
};