This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-15
Channels
- # announcements (11)
- # aws (5)
- # babashka (69)
- # beginners (138)
- # calva (5)
- # cider (11)
- # cljsrn (3)
- # clojure (86)
- # clojure-europe (8)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-norway (13)
- # clojure-uk (21)
- # clojurescript (13)
- # conjure (58)
- # core-typed (2)
- # data-science (2)
- # datomic (5)
- # degree9 (4)
- # emotion-cljs (4)
- # figwheel-main (8)
- # fulcro (29)
- # graalvm (70)
- # interop (2)
- # joker (1)
- # lein-figwheel (2)
- # leiningen (13)
- # liberator (4)
- # off-topic (21)
- # pedestal (2)
- # re-frame (10)
- # shadow-cljs (42)
- # spacemacs (29)
- # spire (1)
- # tools-deps (11)
- # vim (26)
- # xtdb (5)
I'm trying split my defmethods into different files, while having the defmulti in a parent file. When google for it the recommendation is using in-ns and the load
function. But it doesnt seem to work in cljs
Can I share a test between clj and cljs? I have an e-mail spec that relies on a regex, and would like to know that it works both in jvm and js. The way I am trying it now is to have the test in a cljc file, where the clojure test runner just finds it, but I fail to make it visible to my cljs test framework (which is using cljs.test
).
Iv’e tried to require the cljc test file (let’s say :as ct
) and then (deftest email ct/email)
.
why not just add the cljc file to the test runner the same way you add cljs files to the runner?
yeah, that might be the problem. The runner uses a regex that matches all test namespaces… However, it is from one of them that I try to sneak in the cljc residing test…
I should do that w/o the intermediate, probably. Thing is I am not super familiar with the code base and it didn’t have anything testing the clojure side of the cljc defined specs before I wrote this one. So I moved this e-mail test to cljc and thought I could have it tested by just referencing it like I did.