Fork me on GitHub
Eamonn Sullivan10:10:28

Hi all, I think I've asked this question before, but I can't remember how I fixed it. I have a that loads fine in Cider and I can run tests for namespaces (C-c , n), but when I try to run all of the project's tests, I get No assertions (or no tests) were run.Did you forget to use 'is' in your tests?. They run fine from the CLI (`clojure -M:test:runner`). What is cider looking for and isn't finding?


@eamonn.sullivan the cider test runner will run tests evaluated in the repl. Test runners (:test/runner) will run the tests by reading all the source code files. When using the cider test runner I typically evaluate the test code in the REPL first. In Spacemacs a wrapper was added to evaluate the current namespace before calling cider test runner, so running cider-test-run-all-tests command from the *_test.clj file usually loaded all the tests.

Eamonn Sullivan11:10:05

I do the same, but even if I evaluate all of the tests and code (C-c C-k) on every file, cider still doesn't run the project tests. It's not a huge deal. I just like that happy little feeling to see all of the assertions passing, but the important ones are about the code I'm currently modifying...

Eamonn Sullivan11:10:30

C-c , l (run loaded tests) also fails with the same error, even when all of the tests are loaded. I'm pretty sure there was some way to set up the aliases to get this to work...


I assume the alias used which cider-jack-in or when starting the repl externally, includes :extra-paths ["test"] I include the following alias in my ~/.clojure/deps.edn

  {:extra-paths ["dev"]}


hmm... I seem to be having a problem with emacs taking ~100% cpu and hanging while trying to debug some code. Is anyone else having a similar issue? (it might just be b/c the function is horrible, but if it wasn't so ugly I wouldn't need the debugger 😄 )


I'm getting a Syn nREPL request timed out and my emacs locks up nicely. I'm running the latest from MELPA on emacs 27.1


(I'm presuming it is me which is why I'm asking first)


@otfrom I assume you are using o from the debug menu if you need to step over any infinite lazy sequences, eg. (range). Thats the only time I recall blowing up emacs with cider debug.


debugging a much shorter function seems to work. I'll need to remember to step over the lazy seqs (esp the infinite ones)


I learnt by forgetting to do this many times 🙂


one thing (that I'm pretty sure is a config thing) is that when I am debugging, I get the truncated value in the src window where I'm stepping through, but I get a much larger single line value that goes to *Messages*, which then slows down all of emacs due to the long lines bug. Is there a way to turn this off?


I know I can delete the buffer (same as I know how to clear the repl buffer), but I'd like to stop it from happening


I'm having a look at that now. I'm wondering if it is the minibuffer bit of the overlay


hmm... I can't find a way to get at this. I've limited the overlay to only show at the end of the line, not the mini-buffer, I've changed the print quota to 160. Had a look through the docs and the issues and I can't find a way to limit printing of large data structures (not infinite, but big) in *Messages*


not quite sure what to do next


I'm solving the debugging problem by just rewriting the horrible code

👍 6

cider and cljfmt seem to be in accord. I now work for a company that uses cljstyle, and sadly cider/cljfmt and cljstyle have indentation differences. Besides using a after-save-hook has anyone reconciled these unfortunate differences in a way they could live with?


clojure-mode has a few different settings for indentation. ideally you can get clojure-mode to indent in the way you like and then put them in a dir locals file for your work repo


Thanks, will probably have to create a lot of dir locals files 😀


you should only (or hopefully) need only a single one. put it at the root of your directory structure and it will cascade to any file in that tree

👍 6