Skip to content

Commit c2aab9a

Browse files
committed
【update】sonar ut report
1 parent e50de34 commit c2aab9a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/karma.conf.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Karma configuration
22
// Generated on Fri Feb 17 2017 15:57:25 GMT+0800 (中国标准时间)
3-
3+
var fileUtil = require('karma-sonarqube-unit-reporter/src/file-util.js')
44
module.exports = function (config) {
55
// 设置测试的超时时间
66

@@ -136,10 +136,13 @@ module.exports = function (config) {
136136
sonarQubeUnitReporter: {
137137
sonarQubeVersion: 'LATEST',
138138
outputFile: 'testcoverage/ut_report.xml',
139-
overrideTestDescription: true,
140-
testPath: './test',
141-
testPaths: ['./test'],
142-
testFilePattern: '.spec.js',
139+
filenameFormatter: (nextPath, result) => {
140+
const testPath = ['./test'];
141+
const testFilePattern = '.spec.js';
142+
const filesForDescriptions = fileUtil.getFilesForDescriptions(testPath, testFilePattern);
143+
const filePath = filesForDescriptions[nextPath];
144+
return 'frontend/' + filePath;
145+
},
143146
useBrowserName: false
144147
},
145148
// web server port

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy