diff --git a/lib/reporters/html.js b/lib/reporters/html.js
index <HASH>..<HASH> 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
         );
       }
refactor: replace deprecated 'String.prototype.substr()' (#<I>)

'substr()' is deprecated, so we replace it with 'slice()' which works similarily.