【问题标题】:Karma TestRunner业力测试跑步者
【发布时间】:2020-03-04 06:17:44
【问题描述】:

我为我的 Angular 应用打开了 testRunner Karma。窗口有问题,在测试运行器的右上角,它显示 'finished in NaNs' 。据我了解,它应该显示运行测试所需的时间。有人知道如何解决吗?谢谢


module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine', '@angular-devkit/build-angular'],
    plugins: [
      require('karma-jasmine'),
      require('karma-chrome-launcher'),
      require('karma-jasmine-html-reporter'),
      require('karma-coverage-istanbul-reporter'),
      require('karma-spec-reporter'),
      require('@angular-devkit/build-angular/plugins/karma')
    ],
    client: {
      clearContext: false // leave Jasmine Spec Runner output visible in browser
    },
    coverageIstanbulReporter: {
      dir: require('path').join(__dirname, './coverage),
      reports: ['html', 'lcovonly', 'text-summary'],
      fixWebpackSourcePaths: true,
    },

    specReporter: {
      maxLogLines: 5,
      showSpecTiming: false,

    },


    reportSlowerThan: 1,
    reporters: ['progress', 'kjhtml', 'coverage-istanbul', 'spec'],
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false,
    restartOnFileChange: true,

  });
};

【问题讨论】:

    标签: unit-testing karma-jasmine karma-runner


    【解决方案1】:

    找到了我得到这个错误的原因。与当前版本的code-jasmine有关,必须到上一个版本才能使用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-26
      相关资源
      最近更新 更多