This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-22
Channels
- # 100-days-of-code (1)
- # adventofcode (21)
- # announcements (2)
- # beginners (44)
- # calva (1)
- # cider (2)
- # cljdoc (16)
- # cljs-dev (70)
- # cljsrn (29)
- # clojure (66)
- # clojure-austria (1)
- # clojure-europe (4)
- # clojure-finland (1)
- # clojure-hamburg (1)
- # clojure-italy (24)
- # clojure-nl (3)
- # clojure-uk (127)
- # clojurescript (30)
- # core-typed (3)
- # cursive (34)
- # data-science (2)
- # datomic (16)
- # duct (17)
- # editors (1)
- # emacs (4)
- # figwheel-main (4)
- # fulcro (40)
- # hoplon (2)
- # instaparse (5)
- # kaocha (4)
- # leiningen (1)
- # luminus (4)
- # nrepl (46)
- # off-topic (5)
- # onyx (2)
- # other-languages (55)
- # parinfer (3)
- # protorepl (4)
- # re-frame (33)
- # reagent (6)
- # reitit (13)
- # ring-swagger (5)
- # shadow-cljs (26)
- # spacemacs (4)
- # sql (8)
- # testing (27)
- # tools-deps (21)
- # yada (1)
ok. I'm using Atom+ProtoRepl and I just found the command to run the tests.. 😉 thx
😞 I was wrong... using repl the tests are not running... altough it prints as if testing, but no test is ran
...Testing taoensso.encore
Testing io.aviso.writer
Testing clojure.tools.nrepl.misc
Testing clojure.core
Testing clojure.tools.reader.reader-types
Testing clojure.walk
Testing taoensso.truss.impl
Testing flatland.ordered.set
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
@seancorfield do I need to config smthing so that (clojure.test/run-all-tests)
invoke expectations
tests?
@gleisonsilva None of those namespaces would have tests in them. You need to load (`require`) the namespaces that have the tests in them.
It looks like you've only loaded your source (non-test) namespaces.
seens like only the "src" folder has been loaded
how can I tell proto-repl to load "test" folder (in deps.edn there is a alias with that)?
I start my REPL manually and connect ProtoREPL to it -- I haven't had much luck with the built-in CLI / deps.edn
support in ProtoREPL.
So I have an alias :test
which adds just my test dependencies and :extra-paths ["test"]
(and I have :runner
as a separate alias for Cognitect's test runner)
See https://github.com/seancorfield/dot-clojure/blob/master/deps.edn for example.
In a terminal, I run clojure -A:proto:nrepl:test
in my project and once that starts I connect to it in Atom with ctl-, Y and enter the port if it isn't pre-selected.
now I have succeed in load test folder in protorepl
but seens like the 'expect' are not been recognized, see:
it prints Testing...
but Ran 0 tests..
are (clojure.test/run-tests)
able to automatically understand expect
calls in my test namespace? Or do I need to set something special?
No, the old style of expect
tests do not work with any clojure.test
tooling. You need to change to the new, named expectations style.
right! I got it. Thx
😉 i made it! it is working all through proto-repl now
ProtoREPL's hot keys to run tests do not work with the expectations
namespace style -- as I mentioned above, you need to use named expectations defexpect
from the expectations.clojure.test
namespace instead.
This is why you're having so much trouble.
The original Expectations library did not work properly with clojure.test
or any of the "standard" test tooling (that was all built on top of clojure.test
).
That's why there's a new expectations.clojure.test
namespace, with defexpect
to define named expectations (and its own versions of expect
etc). See https://clojure-expectations.github.io/clojure-test.html
Since you're using the older format of expectations, I'm surprised you're able to get the tests running at all with Cognitect's test runner (I suspect it's mere coincidence -- and the tests just run at JVM shutdown).
No, the old style of expect
tests do not work with any clojure.test
tooling. You need to change to the new, named expectations style.