refactor: replace deprecated String.prototype.substr() (#45397)

.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

PR Close #45397
This commit is contained in:
Tobias Speicher
2022-03-20 11:23:47 +01:00
committed by Dylan Hunn
parent 0f9b3c67b4
commit 4ddcf81e61
77 changed files with 149 additions and 143 deletions
@@ -16,7 +16,7 @@ import {customAsyncMatchers} from './jasmine-custom-async-matchers';
describe('BuildCreator', () => {
const pr = 9;
const sha = '9'.repeat(40);
const shortSha = sha.substr(0, SHORT_SHA_LEN);
const shortSha = sha.slice(0, SHORT_SHA_LEN);
const archive = 'snapshot.tar.gz';
const buildsDir = 'builds/dir';
const hiddenPrDir = path.join(buildsDir, `hidden--${pr}`);