Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
refactor(test): use substring instead of substr
Browse files Browse the repository at this point in the history
  • Loading branch information
bxt authored and KnisterPeter committed Jan 28, 2022
1 parent 98c8658 commit cedd158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function testify(str: string, testId: string, test: string): string {
const regexp = new RegExp(pattern);

if (str.startsWith("origin/")) {
return `origin/${testify(str.substr("origin/".length), testId, test)}`;
return `origin/${testify(str.substring("origin/".length), testId, test)}`;
}
return regexp.test(str) ? str : test.replace("%s", str).replace("%t", testId);
}
Expand Down

0 comments on commit cedd158

Please sign in to comment.