From 3eff10bbbf58c5f670dbb523c598ad2d348bc3c9 Mon Sep 17 00:00:00 2001 From: CommanderRoot Date: Fri, 25 Mar 2022 21:18:41 +0100 Subject: [PATCH] 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 --- test/functional/makehtml/testsuite.features.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/makehtml/testsuite.features.js b/test/functional/makehtml/testsuite.features.js index 8cbdfc0..25cf78c 100644 --- a/test/functional/makehtml/testsuite.features.js +++ b/test/functional/makehtml/testsuite.features.js @@ -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);