From 9ba2168e4fa2dc921107228ef1c689370162d2d6 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Fri, 18 Mar 2022 01:25:33 +0100 Subject: [PATCH] chore: replace deprecated String.prototype.substr() .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- lib/reporters/html.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reporters/html.js b/lib/reporters/html.js index f0fb538a91..034fb07f01 100644 --- a/lib/reporters/html.js +++ b/lib/reporters/html.js @@ -181,7 +181,7 @@ function HTML(runner, options) { if (indexOfMessage === -1) { stackString = test.err.stack; } else { - stackString = test.err.stack.substr( + stackString = test.err.stack.slice( test.err.message.length + indexOfMessage ); }