-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html reporter link to specific test is broken on some special characters #1687
Comments
I can reproduce the bug. Digging deeper, the issue is caused because the if (query.grep) mocha.grep(new RegExp(query.grep)); Because the grep argument isn't escaped, it produces regex objects like: /test that $.jQuery works/ Which of course don't work. Patch incoming. |
My bad. I had this backwards. |
I'm on an 1.21.4 and would like to upgrade. I tried upgrading to the current 2.2.5 and encountered this issue immediately b/c all of our tests have |
@KevinB7, could you try @benvinegar's patch? |
If the test title contains some special characters (for instance $ or () ) then its link in the HTML report does not work.
IMO the fix should be escaping regex here before calling encodeURIComponent(s)
The text was updated successfully, but these errors were encountered: