mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-04 20:15:23 -08:00
Use String.substring() function instead of the deprecated String.substr()
This commit is contained in:
@@ -94,7 +94,7 @@ export class DotnetTrxParser implements TestParser {
|
||||
const resultTestName = r.result.$.testName
|
||||
const testName =
|
||||
resultTestName.startsWith(className) && resultTestName[className.length] === '.'
|
||||
? resultTestName.substr(className.length + 1)
|
||||
? resultTestName.substring(className.length + 1)
|
||||
: resultTestName
|
||||
|
||||
const test = new Test(testName, r.result.$.outcome, duration, error)
|
||||
@@ -177,7 +177,7 @@ export class DotnetTrxParser implements TestParser {
|
||||
const filePath = normalizeFilePath(fileStr)
|
||||
const workDir = this.getWorkDir(filePath)
|
||||
if (workDir) {
|
||||
const file = filePath.substr(workDir.length)
|
||||
const file = filePath.substring(workDir.length)
|
||||
if (trackedFiles.includes(file)) {
|
||||
const line = parseInt(lineStr)
|
||||
return {path: file, line}
|
||||
|
||||
Reference in New Issue
Block a user