【问题标题】:Karma / PhantomJS browser is started but no test result is displayed in the consoleKarma / PhantomJS 浏览器已启动,但控制台中未显示测试结果
【发布时间】:2016-03-16 13:42:17
【问题描述】:

如标题所述,Karma 启动 PhantomJS 浏览器,但没有显示测试结果。


这就是我在运行 karma start karma.config.js 时得到的全部结果

当我使用 Chrome 或任何其他浏览器时工作正常。


编辑:
我的karma.config.js 文件:

module.exports = function(config) {
  config.set({

    basePath: '',

    frameworks: ['jasmine'],

    files: [
        '../../../node_modules/angular/angular.min.js',
        '../../../node_modules/angular-mocks/angular-mocks.js',
        '../app/**/*.js',
        'unitTest/*.js'
    ],

    exclude: [
    ],

    preprocessors: {
    },

    reporters: ['progress'],

    port: 9876,

    colors: true,

    logLevel: config.LOG_INFO,

    autoWatch: false,

    browsers: ['PhantomJS'],

    singleRun: false,

    concurrency: Infinity
  })
}

编辑 2:
问题解决了。我只需要打开 karma watcher (autoWatch: true)。

【问题讨论】:

  • 请添加karma.config 文件
  • 我刚做了。谢谢!
  • 谢谢!同样的问题[和解决方案]在这里

标签: javascript phantomjs karma-runner


【解决方案1】:

帮助他人:答案就在问题中:

我只需要开启业力观察者 (autoWatch: true)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多