Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Use existing test URL builder in failed replay links

Buck Doyle8c5ce96b7930
diff --git a/lib/reporters/html.js b/lib/reporters/html.js
index e4737345..31ec1061 100644
--- a/lib/reporters/html.js
+++ b/lib/reporters/html.js
@@ -135,7 +135,7 @@ function HTML(runner) {
} else if (test.pending) {
var el = fragment('<li class="test pass pending"><h2>%e</h2></li>', test.title);
} else {
- var el = fragment('<li class="test fail"><h2>%e <a href="?grep=%e" class="replay">‣</a></h2></li>', test.title, encodeURIComponent(test.fullTitle()));
+ var el = fragment('<li class="test fail"><h2>%e <a href="%e" class="replay">‣</a></h2></li>', test.title, self.testURL(test));
var str = test.err.stack || test.err.toString();
// FF / Opera do not add the message