This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-15
Channels
- # aleph (5)
- # announcements (1)
- # architecture (35)
- # babashka (9)
- # beginners (87)
- # chlorine-clover (13)
- # cider (3)
- # cljdoc (12)
- # clojure (16)
- # clojure-australia (2)
- # clojure-dev (4)
- # clojure-europe (5)
- # clojuredesign-podcast (21)
- # clojurescript (19)
- # conjure (1)
- # core-async (1)
- # data-science (1)
- # emacs (44)
- # events (2)
- # helix (1)
- # leiningen (2)
- # malli (31)
- # pathom (3)
- # pedestal (31)
- # portal (3)
- # reagent (20)
- # reitit (5)
- # reveal (2)
- # rewrite-clj (18)
- # tools-deps (6)
- # xtdb (5)
Hey guys. Working on my first Clojurescript project and I've come across something weird.
Basically:
• Going to
is fine
• Going to
isn't fine.
I get GET
In my project.clj
I have:
:builds {:app {:target :browser
:output-to "resources/public/js/compiled/app.js"
:output-dir "resources/public/js/compiled/out"
:asset-path "/js/compiled/out"
...}
:devtools {:http-root "resources/public" :http-port 8280}
In index.html
, I have:
My folder structure looks like this:My reitit routes look like:
[["/" :root]
["/auth"
["/post-sign-in" :auth/post-sign-in]]
@nicdaoraf it should be <script src="/js/compiled/app.js"></script>
. without the leading slash it'll use the basepath of the current page which will be
+ the src
oh wow. Thanks a lot! That worked
Has anyone succeeded with running inline tests under :test metadata tag of a function in shadow-cljs? (cljs.test/run-tests)
seems to not pick up any of my inline tests.
@hallstrom.eric works just fine for me?
cljs.user=> (require '[cljs.test :as ct])
nil
> (defn foo {:test #(ct/is (= 1 2))} [a b])
#object[Function]
> (ct/run-tests)
Testing cljs.user
FAIL in (foo) (repl-input.cljs:1:26)
expected: (= 1 2)
actual: (not (= 1 2))
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
nil
Hmm ok, I'm trying to run it through cursive repl that I've connected to shadow-cljs watch app
thats my problem, it seems to not work :~|, I'm running shadow-cljs watch app
and then from cursive remote REPL connected to that nrepl: (shadow/watch :app)
(shadow/repl :app)
and then (cljs.tests/run-tests)
but just when I'm typing this I found out that cljs.test/ruun-tests 'my-namespace
was needed ...!
maybe you want run-all-tests
? otherwise run-tests
defaults to running tests in the current ns
ye, I just wanted to run the tests in the current namespace but doing (cljs.test/run-test)
without arguments didn't pick up any
just managed to port my figwheel project to shadow-cljs and it's awesome! thank you so much @U05224H0W for all the work you do