|
1 | 1 | "use strict";
|
2 |
| -var existingKarmaConfig = require('@microsoft/sp-build-web/lib/karma/karma.config'); |
3 |
| -var gulp_core_build = require("@microsoft/gulp-core-build"); |
4 |
| -var htmlReporter = require('karma-html-reporter'); |
5 |
| -var remapCoverageReporter = require('karma-remap-coverage'); |
6 |
| -var path = require('path'); |
| 2 | +const existingKarmaConfig = require('@microsoft/sp-build-web/lib/karma/karma.config'); |
| 3 | +const gulp_core_build = require("@microsoft/gulp-core-build"); |
| 4 | +const htmlReporter = require('karma-html-reporter'); |
| 5 | +const remapCoverageReporter = require('karma-remap-coverage'); |
| 6 | +const path = require('path'); |
7 | 7 |
|
8 | 8 | module.exports = function (config) {
|
9 | 9 | existingKarmaConfig(config);
|
10 | 10 | // Add the HTML reporter
|
11 | 11 | config.reporters.push('html');
|
12 | 12 | config.htmlReporter = {
|
13 |
| - outputDir: path.join(gulp_core_build.getConfig().tempFolder, 'karma-html-report'), // where to put the reports |
14 |
| - templatePath: null, // set if you moved jasmine_template.html |
15 |
| - focusOnFailures: true, // reports show failures on start |
16 |
| - namedFiles: true, // name files instead of creating sub-directories |
17 |
| - pageTitle: 'sp-dev-fx-controls-react unit-tests report', // page title for reports; browser info by default |
18 |
| - urlFriendlyName: false, // simply replaces spaces with _ for files/dirs |
19 |
| - reportName: 'sp-dev-fx-controls-react-report', // report summary filename; browser info by default |
| 13 | + outputDir: path.join(gulp_core_build.getConfig().tempFolder, 'karma-html-report'), |
| 14 | + templatePath: null, |
| 15 | + focusOnFailures: true, |
| 16 | + namedFiles: true, |
| 17 | + pageTitle: 'sp-dev-fx-controls-react unit-tests report', |
| 18 | + urlFriendlyName: false, |
| 19 | + reportName: 'sp-dev-fx-controls-react-report', |
20 | 20 | };
|
21 | 21 | config.plugins.push(htmlReporter);
|
22 | 22 |
|
|
0 commit comments