Skip to content

Commit

Permalink
fix: remove bad test link params in HTML reporter (#5102)
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 12, 2024
1 parent 1173da0 commit 92af340
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 92af340

Please sign in to comment.