This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-17
Channels
- # adventofcode (2)
- # beginners (153)
- # cider (14)
- # clara (9)
- # cljs-dev (8)
- # cljsjs (1)
- # cljsrn (4)
- # clojure (124)
- # clojure-dev (9)
- # clojure-france (18)
- # clojure-greece (22)
- # clojure-italy (11)
- # clojure-nlp (5)
- # clojure-russia (9)
- # clojure-spec (21)
- # clojure-uk (40)
- # clojurescript (82)
- # core-async (12)
- # cursive (3)
- # data-science (2)
- # datomic (225)
- # devcards (8)
- # docs (2)
- # duct (1)
- # emacs (18)
- # figwheel (2)
- # fulcro (117)
- # graphql (13)
- # hoplon (10)
- # jobs (7)
- # jobs-discuss (7)
- # keechma (8)
- # leiningen (4)
- # off-topic (16)
- # om (2)
- # om-next (3)
- # perun (11)
- # precept (4)
- # re-frame (24)
- # reagent (2)
- # remote-jobs (8)
- # ring (2)
- # ring-swagger (9)
- # rum (42)
- # shadow-cljs (8)
- # spacemacs (3)
- # specter (7)
- # uncomplicate (10)
- # unrepl (58)
- # yada (9)
(ct/deftest test-a!
(ct/is (thrown? Error (a! nil)))
(ct/is (thrown? AssertionError (assert false)))
(ct/is (thrown? java.lang.ArithmeticException (/ 1 0)))) ;; cursor is here
C-x C-e defines the test
I know about 'cider-run-tests'
However, I don't always want to run all tests.
Is there a way to say "run only the test right in front of the cursor" ?C-c C-t t
(or equivalently C-c C-t C-t
) is bound to cider-test-run-test
which runs the test at point. I believe in your example it would run all three is
clauses in test-a!
.
@gonewest818 : 1. cider-test-run-test is great 2. this may be cause I'm using evil/lispy/lispyville cider-test-run-test seems to want the cursor to be on the "(" whereas cider-eval-last-sexp seems to want cursor to be on the ")"
@gonewest818: I just defined
(defun my-cider-test-run-test-last-sexp ()
(interactive)
(save-excursion
(evil-backward-char 1)
(lispy-left 1)
(cider-test-run-test)))
and it works beautifully now; thanks! π> cider-test-run-test seems to want the cursor to be on the β(β whereas cider-eval-last-sexp seems to want cursor to be on the β)β
I thought it was supposed to work anywhere within the test definition. File a ticket about this, maybe itβs worth adding some other way to run a single test.
this looks like another case of "solve problem use lispy, @bozhidar solves it correctly" π π π
(foo (+ 2 3) # (* 4 5))
# = my cursor
is there a command which will transform the above into
foo (+ 2 3) # (* 4 5)
what I want is: find smallest 'parent ()', remove the ()
in paredit M-s
for paredit-splice-sexp