如标题所述,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
)。
最佳答案
帮助他人:答案就在问题中:
All i needed was to turn on karma watcher (
autoWatch: true
).
关于javascript - Karma/PhantomJS 浏览器启动但控制台不显示测试结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36037416/