-
Notifications
You must be signed in to change notification settings - Fork 176
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 middleware for ClojureScript #555
Comments
I guess @jeffvalk can speak best to his intentions, but I think he implemented the middleware in terms of eval mostly to be able to interrupt the test execution - otherwise we'd potentially need some special mechanism to do so. Btw, when it comes to ClojureScript support that's actually not a bad thing, as the |
Yep I am aware of the eval limitation and still hammock-ing on that as well 😄 |
@arichiardi I did attempt to explain the reason in the comment here... cider-nrepl/src/cider/nrepl/middleware/test.clj Lines 190 to 192 in a14a653
Apparently I wasn't as clear as I'd hoped! 🙂 Originally, the code used
|
Thank you @jeffvalk this is exactly what I was looking for! And yes I would say that - naively maybe - I was kind of thinking you could still use Probably not though because the user might have already overridden those. What one would need for tooling is something like a |
The custom What data were you thinking of piping multiple ways? If that's really what's needed, it sounds simple enough. Not sure what you're envisioning though. |
@jeffvalk What I don't understand is just the use of the eval middleware to drive all of this. What was the problem with simply running the tests directly in the test middleware? Above I speculated you wanted to make them interruptible, but this could have been achieved with an extra op for the test middleware as well. I was also thinking that if we simply counted the tests the before we ran them and sent an update after each ran implementing the dynamic run progress would be much easier. |
@bbatsov Using the eval middleware wasn't my doing, so I can't speak to the trade-offs. That addition happened in 8b9e341. Looks like this was in response to clojure-emacs/cider#1095. |
Oh, I totally forgot it was @Malabarba who did this. Well, at least it seems I guessed right. :-) |
Is this the issue where people should voice their support for making the |
@PEZ I get this, but unfortunately everything that requires evaluation of ClojureScript code is a bit hard to do, as you have to actually pipe this code to the |
worth noting here I suppose that there is a workaround to run cljs tests in emacs with kaocha via https://github.com/magnars/kaocha-runner.el kaocha takes care of actually running the tests (both clj and cljs) the above emacs package is the frontend so you can run test at point, tests in ns etc. |
Yeah, that's true. But it's just an eval-based solution which we can immediately have in CIDER even without an extra package. I believe the real point of this ticket is to provide a generic solution that other editors can use directly as well. @SevereOverfl0w brought up the point that we can actually evaluate code via the cljs repl environment and if that's the case probably that's the simplest real solution that we can come up with. |
Hi all, I have been longing for some minimal test support for ClojureScript for long time and I actually had a look at the code.
It seems to me it is doing a lot and I am quite wondering why. I did get the custom reporting piece so that we can stream back to cider but it is also basically replicating the test execution functions.
I told myself "there must be a reason!". So I opened this ticket for asking more info 😄
In my head the most basic test functionality is something that calls
test/test-var
with the var of the symbol at point.The text was updated successfully, but these errors were encountered: