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

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
pull/709/head^2
CommanderRoot 2022-03-25 21:18:41 +01:00 committed by GitHub
parent a5f3add2b6
commit 3eff10bbbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ describe('makeHtml() features testsuite', function () {
function testImageUrlExists (imgUrl) {
// Strip the quotes
imgUrl = imgUrl.substr(0, imgUrl.length - 1).substr(1);
imgUrl = imgUrl.slice(1, -1);
return function (done) {
(imgUrl.startsWith('http://') ? http : https).get(imgUrl, function (res) {
expect(res.statusCode).to.equal(200);