mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-04 13:37:56 +01:00
Use String.substring() function instead of the deprecated String.substr()
This commit is contained in:
parent
ff2d13cc36
commit
17c900ba4e
9 changed files with 12 additions and 12 deletions
|
|
@ -242,13 +242,13 @@ export class DartJsonParser implements TestParser {
|
|||
private getRelativePath(path: string): string {
|
||||
const prefix = 'file://'
|
||||
if (path.startsWith(prefix)) {
|
||||
path = path.substr(prefix.length)
|
||||
path = path.substring(prefix.length)
|
||||
}
|
||||
|
||||
path = normalizeFilePath(path)
|
||||
const workDir = this.getWorkDir(path)
|
||||
if (workDir !== undefined && path.startsWith(workDir)) {
|
||||
path = path.substr(workDir.length)
|
||||
path = path.substring(workDir.length)
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue