Skip to content

Commit

Permalink
chore: replace deprecated String.prototype.substr()
Browse files Browse the repository at this point in the history
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
  • Loading branch information
CommanderRoot committed Mar 18, 2022
1 parent d7f6ea5 commit 9ba2168
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reporters/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down

0 comments on commit 9ba2168

Please sign in to comment.