这是我的配置文件:
module.exports = function(config) {
config.set({
basePath: './',
autoWatch: true,
frameworks: ['jasmine'],
files: [
'../public_html/libs/mylib/lib.js',
'../public_html/libs/mylib/utility.js',
'../public_html/libs/mylib/config/*.js',
'../public_html/libs/mylib/enumerations.js',
'../public_html/libs/mylib/apiComm.js',
'../public_html/libs/mylib/baseObject.js',
'../public_html/libs/mylib/book.js',
'../public_html/libs/mylib/file.js',
'../public_html/libs/mylib/library.js',
'../public_html/libs/mylib/publishing.js',
'../public_html/libs/mylib/topic.js',
'../test/*Spec.js'
],
reporters: ['progress', 'coverage'],
preprocessors: {
'../public_html/libs/mylib/topic.js': ['coverage']
},
port: 9876,
colors: true,
browsers: ['Chrome'],
captureTimeout: 60000,
singleRun: false
});
};
每当我运行karma start config/karma.config.js
它时,它都会运行单元测试并coverage
在正确的位置创建文件夹。但是,它将 topic.js.html 文件转储到与 topic.js 相同的目录中。为什么?