Ban*_*San 15 javascript testing karma-runner
我正在使用Karma来测试我的项目,并且可以看到测试在控制台窗口中传递失败,但是,如何在浏览器中显示这些?浏览器只有一个绿色条(即使测试失败)
Karma v0.10.2 - 已连接
写在里面.
我已尝试将addong添加singleRun :false到karma.config.js文件中.
配置文件如下所示:
module.exports = function (config) {
config.set({
basePath: '../',
files: [
'app/lib/angular/angular.js',
'app/lib/angular/angular-*.js',
'test/lib/angular/angular-mocks.js',
'app/js/**/*.js',
'test/unit/**/*.js'
],
autoWatch: true,
singleRun: false,
frameworks: ['jasmine'],
browsers: ['Chrome'],
plugins: [
'karma-junit-reporter',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine'
],
junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
})
}
Run Code Online (Sandbox Code Playgroud)
matthias-schuetz写了一个声称生成html测试输出的插件.
https://npmjs.org/package/karma-htmlfile-reporter
随着插件页面上的说明,我必须在Karma配置中包含对插件的引用 -
plugins: [
'karma-htmlfile-reporter'
]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12164 次 |
| 最近记录: |