0
유닛 테스트를 실행하기 위해 카르마를 사용 중이며 karma-coverage
을 프로세스에 통합하려고합니다. singleRun: true
으로 테스트를 실행하려면 PhantomJS
을 사용하고 있습니다. 이 작업을 수행 할 때마다 코드 커버리지 리포터가 실행되지 않는 것처럼 보입니다. singleRun: false
으로 설정하면 폴더와 파일이 만들어집니다.singleRun = true 일 때 karma-coverage 파일이 작성되지 않았습니다.
karma coverage tool이 실행되지 않는 이유는 무엇입니까?
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'requirejs', 'sinon-chai'],
files: [
{ pattern: 'bower_components/angular/angular.js', included: false },
{ pattern: 'bower_components/jquery/dist/jquery.js', included: false },
{ pattern: 'bower_components/angular-mocks/angular-mocks.js', included: false },
{ pattern: '**/*.js', included: false },
{ pattern: 'KarmaTests/test-main.js', included: true },
{ pattern: 'KarmaTests/**/*Test*.js', included: false }
],
preprocessors: {
'KarmaTests/*/*.js': ['coverage']
},
reporters: ['progress', 'coverage'],
coverageReporter: {
type: 'html',
dir: '_testCoverage/',
file: 'cover.html'
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['PhantomJS'],
//files are created when false, are not when true
singleRun: false
});
};
어떤 버전입니까? '카르마 '의 시온은 당신이 사용하고 있습니까? – MarcoL