-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Handle the unknown-op
status from test commands.
#1365
Handle the unknown-op
status from test commands.
#1365
Conversation
8762921
to
76491bd
Compare
This PR needs work before it can be merged – when the test command fails the new REPL prompt is not printed (as seen in the screenshot) |
Aha, the calls to |
76491bd
to
6cb9ea7
Compare
@PEZ this should be good to review now. |
Thanks! LGTM. Have you had a look, @bpringe? |
@marcomorain Thanks for this PR. I installed the vsix and when I run this simple test using the (ns test-lein.core-test
(:require [clojure.test :as test]
[test-lein.core :refer :all]))
(test/deftest a-test
(test/testing "Some test"
(test/is (= 1 1)))) I just get this message with nothing else: ; Running test: a-test… Then I can't evaluate anything else, even if I run the command to interrupt evaluations. At least, I'm not seeing any results printed. Using the latest Calva version, this scenario works as expected. |
@bpringe thanks for that – I was only testing the negative case when I was running this, and never tested actually running tests 🤦 Is there a way to run a test like yours in CI? |
6cb9ea7
to
5c844d2
Compare
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
5c844d2
to
0ab7fd8
Compare
This is ready for review again 🙏 |
What do you mean, exactly? I tested the VSIX and it seems good to me! |
I mean, is there a way that we write an integration test of that starts Calva, connects to a REPL server, evaluates some source, and runs a test? |
@marcomorain Oh, it may be possible. I'm not sure how easy it would be to involve a repl in integration tests, though. |
It would be a super awesome addition to be able to run tests like those in CI! Please open an issue about it. And a PR is of course super duper welcome. We have an integration test setup that we run in CI. It only starts VS Code and checks that Calva loads. (Or some such). That's where we would hook this test in, most probably. |
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 #1269
Ping @PEZ, @bpringe