Skip to content

armgit / mocha

Public Imported from GitHub
0

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

fix: test link in html reporter (#5224)

Danny Linf054acc1f607
diff --git a/lib/reporters/html.js b/lib/reporters/html.js
index 7f4fa673..5f57279e 100644
--- a/lib/reporters/html.js
+++ b/lib/reporters/html.js
@@ -285,9 +285,9 @@ function HTML(runner, options) {
function makeUrl(s) {
var search = window.location.search;
- // Remove previous grep query parameter if present
+ // Remove previous {grep, fgrep, invert} query parameters if present
if (search) {
- search = search.replace(/[?&]grep=[^&\s]*/g, '').replace(/^&/, '?');
+ search = search.replace(/[?&](?:f?grep|invert)=[^&\s]*/g, '').replace(/^&/, '?');
}
return (