Skip to content

Commit

Permalink
describe "cider-locate-running-nrepl-ports"
Browse files Browse the repository at this point in the history
  • Loading branch information
vemv committed Aug 14, 2023
1 parent 3d052a8 commit c3abfb1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/cider-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,17 @@
;; kill server
(delete-process (get-buffer-process client-buffer)))))))

(describe "cider-locate-running-nrepl-ports"
(it "Works"
(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 '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 123)))

(provide 'cider-tests)

;;; cider-tests.el ends here

0 comments on commit c3abfb1

Please sign in to comment.