This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-27
Channels
- # announcements (4)
- # asami (6)
- # aws-lambda (1)
- # babashka (38)
- # babashka-sci-dev (20)
- # beginners (87)
- # calva (67)
- # cider (19)
- # clerk (13)
- # clojure (102)
- # clojure-europe (52)
- # clojure-filipino (1)
- # clojure-hungary (4)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-sweden (3)
- # clojure-uk (1)
- # cursive (13)
- # data-science (7)
- # datomic (8)
- # deps-new (1)
- # emacs (3)
- # fulcro (16)
- # graphql (3)
- # humbleui (3)
- # kaocha (3)
- # leiningen (3)
- # malli (3)
- # off-topic (14)
- # pathom (34)
- # polylith (4)
- # rdf (12)
- # reitit (3)
- # releases (1)
- # remote-jobs (7)
- # rum (2)
- # sci (22)
- # shadow-cljs (115)
- # tools-deps (26)
- # tree-sitter (29)
I'm using emacs as clojure development environment. My emacs config is https://github.com/rajcspsg/emacs.d
I've test file called core-test in the folder test/getting-started/core-test.clj
folder. The contents of the file is -
(ns getting-started.core-test
(:require [clojure.test :refer :all]
[getting-started.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 0))))
hi @U02PR896TMG. I think I see a few issues:
• filenames must use hyphens. getting-started
folder needs to be getting_started
. So the full path of your file should be test/getting_started/core_test.clj
. This is a JVM limitation. The ns form is correct: use hyphens in the ns name.
• You have to require the namespace for everything to run. Clojure works based on repl state, not just file tree state. So make sure you run cider-load-buffer
and then try again.
Thanks @U11BV7MTK!!!
I would like to run this single test a-test.
I started cider using command cider-jack-in
. Now I'm trying to run single test using command M-x cider-test-run-test
.
I've asked this question emacs.stackexchange as well https://emacs.stackexchange.com/questions/75554/couldnt-run-single-clojure-test-instead-getting-warning-cider-no-test-at-point
Generally everything about tests is well documented here https://docs.cider.mx/cider/testing/running_tests.html (including common caveats)
Let me check this. Thanks @U051BLM8F