-
Couldn't load subscription status.
- Fork 9
Open
Description
Seeing issues of istanbul-instrument-loader, I changed my depencies just got blank file:

Here if my config:
karam.conf.js, use 'coverage-istanbul' reporter
webpack: {
mode: 'development',
devtool: "inline-source-map",
module: {
rules: [
{
test: /\.ts?$/,
// 指定源码位置
include: [path.join(__dirname, 'src')],
use: [
{
loader: "coverage-istanbul-loader",
},
{
loader: 'ts-loader',
},
],
exclude: /node_modules/,
}
],
},
resolve: {
extensions: ['.ts', '.js', '.json']
},
},
tsconfig.json
{
"compilerOptions": {
"outDir": "./output",
"target": "es2017",
"module": "commonjs",
"lib": ["es2015", "es2016", "es2017", "dom"],
"allowJs": false,
"jsx": "react",
"declaration": true,
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"inlineSourceMap": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"noImplicitUseStrict": true,
"noImplicitThis": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"baseUrl": ".",
},
"exclude": [
"node_modules",
"test",
"lib"
]
}
The coverage report is not correct too:

Since I only tested 3 functional files, the right one is (using instrument-loader):

Metadata
Metadata
Assignees
Labels
No labels