Fix cider tests error, and improve implementation
Error was caused by unnecessarily wrapping cider test fns in spacemacs//cider-eval-in-repl-no-focus. Test fns do not move focus to repl anyways, and it caused a wrong-type-argument error. The added bindings are to more closely match cider bindings (under C-c C-t). Now spacemacs cider test fns mirror the cider ones.
This commit is contained in:
parent
02ee0f2e54
commit
39f424bd45
|
@ -110,17 +110,33 @@ the focus."
|
||||||
(defun spacemacs/cider-test-run-focused-test ()
|
(defun spacemacs/cider-test-run-focused-test ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(cider-load-buffer)
|
(cider-load-buffer)
|
||||||
(spacemacs//cider-eval-in-repl-no-focus (cider-test-run-test)))
|
(cider-test-run-test))
|
||||||
|
|
||||||
(defun spacemacs/cider-test-run-all-tests ()
|
(defalias 'spacemacs/cider-test-run-all-tests #'spacemacs/cider-test-run-ns-tests
|
||||||
|
"ns tests are not actually *all* tests;
|
||||||
|
cider-test-run-project-tests would be better here, but
|
||||||
|
there currently is a bug with the function. Replace once
|
||||||
|
it gets fixed.")
|
||||||
|
|
||||||
|
(defun spacemacs/cider-test-run-ns-tests ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(cider-load-buffer)
|
(cider-load-buffer)
|
||||||
(spacemacs//cider-eval-in-repl-no-focus (cider-test-run-ns-tests nil)))
|
(cider-test-run-ns-tests nil))
|
||||||
|
|
||||||
|
(defun spacemacs/cider-test-run-loaded-tests ()
|
||||||
|
(interactive)
|
||||||
|
(cider-load-buffer)
|
||||||
|
(cider-test-run-loaded-tests nil))
|
||||||
|
|
||||||
|
(defun spacemacs/cider-test-run-project-tests ()
|
||||||
|
(interactive)
|
||||||
|
(cider-load-buffer)
|
||||||
|
(cider-test-run-project-tests nil))
|
||||||
|
|
||||||
(defun spacemacs/cider-test-rerun-tests ()
|
(defun spacemacs/cider-test-rerun-tests ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(cider-load-buffer)
|
(cider-load-buffer)
|
||||||
(spacemacs//cider-eval-in-repl-no-focus (cider-test-rerun-tests)))
|
(cider-test-rerun-tests))
|
||||||
|
|
||||||
(defun spacemacs/cider-display-error-buffer (&optional arg)
|
(defun spacemacs/cider-display-error-buffer (&optional arg)
|
||||||
"Displays the *cider-error* buffer in the current window.
|
"Displays the *cider-error* buffer in the current window.
|
||||||
|
@ -256,6 +272,10 @@ If called with a prefix argument, uses the other-window instead."
|
||||||
"Tp" 'spacemacs/cider-toggle-repl-pretty-printing
|
"Tp" 'spacemacs/cider-toggle-repl-pretty-printing
|
||||||
|
|
||||||
"ta" 'spacemacs/cider-test-run-all-tests
|
"ta" 'spacemacs/cider-test-run-all-tests
|
||||||
|
"tb" 'cider-test-show-report
|
||||||
|
"tl" 'spacemacs/cider-test-run-loaded-tests
|
||||||
|
"tp" 'spacemacs/cider-test-run-project-tests
|
||||||
|
"tn" 'spacemacs/cider-test-run-ns-tests
|
||||||
"tr" 'spacemacs/cider-test-rerun-tests
|
"tr" 'spacemacs/cider-test-rerun-tests
|
||||||
"tt" 'spacemacs/cider-test-run-focused-test
|
"tt" 'spacemacs/cider-test-run-focused-test
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue