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 committed 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
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.