Skip to content

Commit

Permalink
fix: remove bad test link params in HTML reporter
Browse files Browse the repository at this point in the history
- `grep` may not work as expected if a previous `fgrep` or `invert` parameter exists.
  • Loading branch information
danny0838 committed Oct 18, 2024
1 parent 708e5f0 commit 6e8bcdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/reporters/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,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 (
Expand Down

0 comments on commit 6e8bcdf

Please sign in to comment.