伊斯坦布尔代码覆盖率报告未在源代码HTML页面中显示结果

我们使用伊斯坦布尔代码覆盖率报告程序进行茉莉花单元测试。报告器在html报告中显示分析的摘要和按文件细分:

伊斯坦布尔代码覆盖率报告未在源代码HTML页面中显示结果

但是,如果我在html报告中单击源文件,则源文件将按预期方式打开-但此处未显示覆盖率信息:

伊斯坦布尔代码覆盖率报告未在源代码HTML页面中显示结果

我希望标记源文件/语句/分支以显示实际结果。

下面的“ karma.config.js”内容:

const webpackConfig = require("./webpack.config.test");
const path = require('path');
const puppeteer = require('puppeteer');

delete webpackConfig.entry;

process.env.CHROME_BIN = puppeteer.executablePath()

module.exports = (config) => {
  config.set({
    frameworks: ['jasmine'],client: {
      clearContext: true
    },files: ['test/**/*.ts'],preprocessors: {
      'test/**/*.ts': ['webpack']
    },webpack: webpackConfig,webpackMiddleware: {
      noInfo: true
    },coverageIstanbulReporter: {
      reports: [ 'html','text-summary','lcovonly','cobertura' ],dir: path.join(__dirname,'coverage'),fixWebpackSourcePaths: true,'report-config': {
        html: { outdir: 'html' }
      }
    },reporters: ['spec','junit','coverage-istanbul'],junitReporter: {
      outputDir: './junit'
    },colors: true,logLevel: config.LOG_INFO,autoWatch: true,browsers: ["ChromeHeadlessnoSandbox"],customLaunchers: {
      ChromeHeadlessnoSandbox: {
        base: 'ChromeHeadless',flags: ['--no-sandbox']
      }
    },singleRun: true
  })
}

任何暗示我也需要在源文件中显示覆盖率信息的提示也将受到高度赞赏。

dongxingchao 回答:伊斯坦布尔代码覆盖率报告未在源代码HTML页面中显示结果

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3146654.html

大家都在问