Habedere(一种常见的巴伐利亚问候), 我的问题是现在,业力html记者不起作用。 我们使用NodeJS,所以我更新了这个“npm update -g”。 当我输入“gulp test”时,会发现像预期的那样,但是没有生成html报告。
以下代码段
karma.conf.js
plugins : [
'karma-chrome-launcher',
'karma-teamcity-reporter',
'karma-phantomjs-launcher',
'karma-html-reporter',
'karma-angular-filesort',
'karma-coverage',
'karma-jasmine',
'karma-ng-html2js-preprocessor'
],
// the default configuration
htmlReporter: {
outputDir: 'karma_html/', // where to put the reports
templatePath: null, // set if you moved jasmine_template.html
focusOnFailures: true, // reports show failures on start
namedFiles: false, // name files instead of creating sub-directories
pageTitle: null, // page title for reports; browser info by default
urlFriendlyName: false, // simply replaces spaces with _ for files/dirs
reportName: 'report-summary-filename', // report summary filename; browser info by default
},
reporters: ['progress', 'html', 'coverage', 'teamcity'],
的package.json
{
"name": "gimliPrototyp",
"version": "0.0.0",
"dependencies": {
"karma-html-reporter": "^0.2.7"
},
"scripts": {
"test": "gulp test"
},
"devDependencies": {
"browser-sync": "~2.9.11",
"browser-sync-spa": "~1.0.3",
"chalk": "~1.1.1",
"del": "~2.0.2",
"eslint-plugin-angular": "~0.12.0",
"estraverse": "~4.1.0",
"gulp": "~3.9.0",
"gulp-angular-filesort": "~1.1.1",
"gulp-angular-templatecache": "~1.8.0",
"gulp-autoprefixer": "~3.0.2",
"gulp-eslint": "~1.0.0",
"gulp-filter": "~3.0.1",
"gulp-flatten": "~0.2.0",
"gulp-inject": "~3.0.0",
"gulp-jasmine": "^2.3.0",
"gulp-load-plugins": "~0.10.0",
"gulp-minify-css": "~1.2.1",
"gulp-minify-html": "~1.0.4",
"gulp-ng-annotate": "~1.1.0",
"gulp-protractor": "~1.0.0",
"gulp-rename": "~1.2.2",
"gulp-replace": "~0.5.4",
"gulp-rev": "~6.0.1",
"gulp-rev-replace": "~0.4.2",
"gulp-sass": "^2.2.0",
"gulp-size": "~2.0.0",
"gulp-sourcemaps": "~1.6.0",
"gulp-uglify": "~1.4.1",
"gulp-useref": "~1.3.0",
"gulp-util": "~3.0.6",
"http-proxy-middleware": "~0.9.0",
"json-server": "^0.8.8",
"karma": "^0.13.22",
"karma-angular-filesort": "~1.0.0",
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "~0.5.2",
"karma-html-reporter": "^0.2.7",
"karma-jasmine": "^0.3.8",
"karma-jasmine-html-reporter": "^0.2.0",
"karma-ng-html2js-preprocessor": "~0.2.0",
"karma-phantomjs-launcher": "~0.2.1",
"karma-teamcity-reporter": "^1.0.0",
"lodash": "^3.10.1",
"main-bower-files": "~2.9.0",
"node-sass": "^3.4.2",
"phantomjs": "~1.9.18",
"uglify-save-license": "~0.4.1",
"wiredep": "~2.2.2",
"wrench": "~1.5.8"
},
"engines": {
"node": ">=0.10.0"
}
}