cider icon indicating copy to clipboard operation
cider copied to clipboard

`cider-test-run-loaded-tests` not running newly loaded tests after changing REPL namespace

Open jasalt opened this issue 1 year ago • 1 comments

I'm trying to keep Cider REPL process alive while switching from a project to a library it uses to make some changes there, but face some problems running library file's tests (written in same file as code).

I find that cider-test-run-loaded-tests loses track of what tests are loaded for library file after I switch REPL namespace from project ns to a library ns with cider-repl-set-ns and load the library file including it's deftests with cider-load-buffer.

After that running cider-test-run-loaded-tests gives "No assertions (or no tests) were run. Did you forget to use ‘is’ in your tests?", while I can still run specific deftest's in the library file with cider-test-run-test or use (run-tests *ns*).

Everything works as expected after restarting Cider from the library ns and loading buffer again.

jasalt avatar Jan 23 '24 11:01 jasalt

Thanks! This looks like a bug, since there are separate cider-test-run-loaded-tests and cider-test-run-project-tests functions.

The underlying middleware is flexible enough to run a variety of things.

vemv avatar Jan 23 '24 11:01 vemv