Skip to content

Commit

Permalink
refactor: replace deprecated 'String.prototype.substr()' (#4852)
Browse files Browse the repository at this point in the history
'substr()' is deprecated, so we replace it with 'slice()' which works similarily.
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
  • Loading branch information
CommanderRoot authored Mar 22, 2022
1 parent 70fe3ad commit a816130
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 a816130

Please sign in to comment.