mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
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>
This commit is contained in:
parent
a5f3add2b6
commit
3eff10bbbf
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user