Closed PEZ closed 1 year ago
I fail to have a test for starting and stopping the server without it interfering with another test where I need a running server. Might be pointing at problem with Joyride's starting and stopping of the server, or my async test fu. Or both.
Not sure what I did, but now I can have have the start-stop test enabled without getting the error about the nrepl server alrady running.
However, I notice that the test results summary is not printed when I have run the nrepl tests. Not even with the binding. (Though that shouldn't be needed, since the nrepl server should be stopped at this point...)
This is the test summary I am referring to:
Ran 17 tests containing 24 assertions.
0 failures, 0 errors.
I added a test confirming that anything we (println ...)
in Joyride code is sent out as out
messages. Didn't see an obvious way to do it using the nrepl-client
so listening on the next data
event and matching out the printed value from the Buffer. WDYT?
That approach sounds good
LGTM
Thanks!
Do you have an idea about why we loose the test results summary? Seems it could be indicating a problem that will come back an bite us.
However, I notice that the test results summary is not printed when I have run the nrepl tests
Perhaps the binding goes out of scope because of laziness or something?
Is it possible to do an alter-var-root
on clojure.core/println with js/console.log
the moment the nrepl server stops?
Is it possible to do an
alter-var-root
on clojure.core/println withjs/console.log
the moment the nrepl server stops?
You mean in the test runner code or in the nrepl server code?
we might as well do that in the nrepl server's code
I'll see what I can figure out. Will let you know if I run into problems. 😄
It seems to be this that causes the test summary to disappear:
If I remove it, the summary comes back (but also, println
s inside evals stops coming via :out
messages).
Let me know if your LGTM still stands. 😄
LGTM re-instated ;)
Added a test for the nrepl server. Testing that it can be started, that we can evaluate with it, and that we can stop it.
Ran into some strange problems when testing the evaluation results:
nrepl-client
, I couldn't get it to work withjs->clj
. The results fromjs->clj
seemed broken. (But it could be that I am stupid too, it is late here.)p/let
where I have the results of theeval
,(println ...)
stops working. Something like(println "BOOM!")
doesn't happen at all.println
problem, failing tests do not print the expected/received output.