Skip to content
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

Calva not detecting tests when trying to run a single tests. #1269

Closed
jmayaalv opened this issue Aug 20, 2021 · 7 comments
Closed

Calva not detecting tests when trying to run a single tests. #1269

jmayaalv opened this issue Aug 20, 2021 · 7 comments
Labels
bug Something isn't working test-runner

Comments

@jmayaalv
Copy link

Calva is unable to detect test when trying to run a single tests. Test is found if all the tests in the namespace are executed.

I could reproduce it on windows and can say that works on cider, so probably not something related to cider-nrepl the output when running a single tests is always:

; Evaluating file: reports_test.clj
#'edge.test.reports-test/sb-switches-report-test
; Running test: _…
; No tests found. :scream:, ns: 0, vars: 0

The same behavior can be seen if deftest is aliased or refered, so doesn't seem to be related to #1086

@bpringe bpringe added bug Something isn't working test-runner labels Aug 22, 2021
@bpringe
Copy link
Member

bpringe commented Aug 22, 2021

Thanks for the report!

@bpringe
Copy link
Member

bpringe commented Sep 5, 2021

I cannot reproduce this on MacOS. I suspect it may be an issue only on Windows. Do you see any errors in the developer console after reproducing the issue? Help -> Toggle Developer Tools -> Console tab

@PEZ Maybe you could try this on your Windows machine?

@jmayaalv If you'd like to debug and fix this, Calva has a pretty easy contribution process.

@jmayaalv
Copy link
Author

jmayaalv commented Sep 6, 2021

Thank you for looking at this @bpringe. I am not really a VS code user myself and the ecosystem is very foreign for me, i use Cider and on macOS as well. I reported this on behalf of a new team mate totally new to the Clojure ecosystem.

We check the the console but there doesn't seem to be anything relevant there, screenshot below:

image (21)

@bpringe
Copy link
Member

bpringe commented Sep 6, 2021

Thanks, it seems a good next step would be for someone to run Calva in the extension development host on Windows and set breakpoints to see where things are going wrong. CC @PEZ

marcomorain added a commit to marcomorain/calva that referenced this issue Oct 27, 2021
Calva currently fails silently when the test commands fail due to the
unknown-op status. Here we handle that error and show a warning message
when it occurs. This doesn't address the root cause of the issue, but it
will help users to understand the problem.

This will help to debug BetterThanTomorrow#1269
marcomorain added a commit to marcomorain/calva that referenced this issue Oct 27, 2021
Calva currently fails silently when the test commands fail due to the
unknown-op status. Here we handle that error and show a warning message
when it occurs. This doesn't address the root cause of the issue, but it
will help users to understand the problem.

This will help to debug BetterThanTomorrow#1269
marcomorain added a commit to marcomorain/calva that referenced this issue Oct 27, 2021
Calva currently fails silently when the test commands fail due to the
unknown-op status. Here we handle that error and show a warning message
when it occurs. This doesn't address the root cause of the issue, but it
will help users to understand the problem.

This will help to debug BetterThanTomorrow#1269
marcomorain added a commit to marcomorain/calva that referenced this issue Oct 28, 2021
Calva currently fails silently when the test commands fail due to the
unknown-op status. Here we handle that error and show a warning message
when it occurs. This doesn't address the root cause of the issue, but it
will help users to understand the problem.

This will help to debug BetterThanTomorrow#1269
marcomorain added a commit to marcomorain/calva that referenced this issue Oct 28, 2021
Calva currently fails silently when the test commands fail due to the
unknown-op status. Here we handle that error and show a warning message
when it occurs. This doesn't address the root cause of the issue, but it
will help users to understand the problem.

This will help to debug BetterThanTomorrow#1269
@marcomorain
Copy link
Contributor

Can you try to reproduce this again with the latest Calva please? We added better error reporting, and I would expect to see a better error message in the REPL window now.

@jmayaalv
Copy link
Author

jmayaalv commented Dec 3, 2021

Hello @marcomorain,
indeed, now with the latest version we still get "no test found" and an error in a test fixture. But at at least now the error is visible. Once we removed the fixture the tests can be executed without problem.

Thanks a lot for the help !

@jmayaalv jmayaalv closed this as completed Dec 3, 2021
@marcomorain
Copy link
Contributor

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test-runner
Projects
None yet
Development

No branches or pull requests

3 participants