This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-25
Channels
- # announcements (1)
- # asami (3)
- # aws (2)
- # babashka (8)
- # beginners (60)
- # biff (3)
- # calva (45)
- # clj-http (3)
- # clj-kondo (19)
- # clojure (50)
- # clojure-europe (23)
- # clojure-nl (8)
- # clojure-spec (4)
- # clojure-uk (3)
- # clojurescript (32)
- # conjure (3)
- # datomic (7)
- # events (2)
- # fulcro (24)
- # graalvm (3)
- # inf-clojure (3)
- # jackdaw (1)
- # lsp (3)
- # malli (8)
- # missionary (14)
- # off-topic (1)
- # polylith (3)
- # portal (11)
- # rewrite-clj (63)
- # shadow-cljs (21)
- # spacemacs (7)
- # tools-build (6)
- # xtdb (4)
I want to have a folder “src” and a folder “test” and then run tests via karma. I have specified :source-paths ["src" "test"]
, but when I run the tests via npx shadow-cljs compile ci && npm run karma
(using setup in https://shadow-cljs.github.io/docs/UsersGuide.html#_the_build) it says 0 tests are found. If I move my test file to the “src” folder and I run the command the tests are found. Is there a way to have a separate test folder from where tests are picked up?
do you actually use shadow-cljs.edn to manage your dependencies? or do you use deps.edn or project.clj?
I use shadow-cljs.edn
and the files are properly namespaced and match the regexp? ie. default namespaces ending in -test
the namespace ends in -test, the file with _test
I rerun npx shadow-cljs compile ci && npm run karma
maybe I can do a deeper clean?
I stopped the server
now it works 🙂
okay thanks!! 😄
swift reply and happy it works
Real quick question: The docs mention that you can set the compiler option :infer-externs
to :auto
, which will trigger the compiler to warn about possible extern issues. However, in the compiler options section of the docs, it says that infer-externs
defaults to true
, which also seems to generate warning about possible extern issues. What’s the difference between :auto
and true
?
My assumption is that :auto
maybe does something extra to generate the appropriate externs (given a simple ^js
typehint), and true
does not. However, I can’t quite tell from the docs if this is a correct assumption.