-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Test runner not finding tests with + in middle of the name #1383
Comments
Thanks for reporting! We should see if this might be an issue with nrepl/cider-nrepl. Calva pretty much just uses cider-nrepl to run the tests - see here: https://github.com/BetterThanTomorrow/calva/blob/published/src/testRunner.ts. Do you have the same / similar issues when running the command to run all tests and the command to run all tests for the namespace? |
@bbatsov Have you seen something like this before? |
Using the same file as above, if I use the run all tests or run all tests in current namespace, things seem to work fine. It's only the individual "run current test" where things break. |
@bpringe I haven't seen this problem, but it's likely on cider-nrepl's side. Feel free to file a ticket there, so we don't forget to look into this. I guess it should be an easy fix. |
It seems we can/should fix this issue in Calva. Details are here: clojure-emacs/cider-nrepl#730 (comment).
|
I might take a look at this this week. |
Per clojure-emacs/cider-nrepl#730, clients should make sure that queries are escaped. We can use the `escape-string-regexp` package, which is already in the source-tree for this. Also, change the call to `test-var-query` to narrow the search to just `test?` true, and remove `search-property`, since `name` is the default per the Cider docs. Fixes BetterThanTomorrow#1383
I've opened a PR that addresses this. |
Given the following file:
this is the output
Note, the last one hangs with the following error in the console:
The last error
+
regex escaping fun a coworker had while searching for the test lead me to believe that there's a regex escaping issue somewhere with the+
character.Expected behavior is that these tests would be detected with the Run Current Test command.
The text was updated successfully, but these errors were encountered: