branch: elpa/cider commit f14c8de03736b1849ea4413534639dfe6e9f745e Author: vemv <v...@users.noreply.github.com> Commit: vemv <v...@users.noreply.github.com>
Describe `cider-locate-running-nrepl-ports` --- test/cider-tests.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/cider-tests.el b/test/cider-tests.el index b804211598..ac63645bb5 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -701,4 +701,17 @@ ;; kill server (delete-process (get-buffer-process client-buffer))))))) +(describe "cider-locate-running-nrepl-ports" + (it "Concatenates values from different sources" + (spy-on 'file-exists-p :and-return-value t) + (spy-on 'cider--running-lein-nrepl-paths :and-return-value '(("lein" "1234"))) + (spy-on 'cider--running-local-nrepl-paths :and-return-value '(("local" "2345"))) + (spy-on 'cider--running-non-lein-nrepl-paths :and-return-value '(("non-lein" "3456"))) + (spy-on 'clojure-project-dir :and-return-value #'identity) + (spy-on 'cider--path->path-port-pairs :and-return-value '(("from-dir" "4567"))) + (spy-on 'directory-file-name :and-call-fake #'identity) + (spy-on 'file-name-nondirectory :and-call-fake #'identity) + (expect (cider-locate-running-nrepl-ports "from-dir") + :to-equal '(("from-dir" "4567") ("lein" "1234") ("local" "2345") ("non-lein" "3456"))))) + ;;; cider-tests.el ends here