This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (70)
- # aws (1)
- # beginners (17)
- # boot (37)
- # business (1)
- # cider (2)
- # cljs-dev (56)
- # cljsrn (6)
- # clojure (151)
- # clojure-germany (1)
- # clojure-nl (5)
- # clojure-poland (5)
- # clojure-russia (34)
- # clojure-taiwan (1)
- # clojurescript (289)
- # clojurex (2)
- # cursive (16)
- # datavis (3)
- # datomic (12)
- # editors (10)
- # emacs (3)
- # hoplon (17)
- # ldnclj (5)
- # lein-figwheel (12)
- # leiningen (1)
- # liberator (1)
- # off-topic (23)
- # om (116)
- # onyx (39)
- # parinfer (44)
- # portland-or (1)
- # reagent (34)
- # yada (6)
Trying to work out the best option for testing lib that works across both clj+cljs and works with reader conditionals. I was previously using midje, but finding it a bit flaky with the newer clojure versions - thinking about just shifting to clojure/cljs.test - unless anyone has any other suggestions?
@markmandel: haven't yet put it through its paces, but speclj appears to be closer to the BDD spirit of midje https://github.com/slagyr/speclj
it's on my radar specifically because it mentions cljs as supported (i've worked in clj but only starting to work in cljs), but bonus it uses rspec-ish semantics
And this library is a library that can work from clj and cljs.. so having tests that can be cljc is pretty important
honestly, and granted i'm new to cljs (as in, days), but i've found cljc fiddly at best
Yeah, that was why my thought was just go back to clojure/cljs.test - keep it super simple
i found clojure.test basically intolerable. best of luck if that's what you end up with
i find the form
(deftest somebadnamewithpoorformating assert-things-that-dont-express-what-i-want-to-ensure) a poor recipe for good testing
I see your point - but I can't have a testing library that just doesn't work with reader conditionals.
so, my inclination (again days in) is to strictly separate clj and cljs. i think testing those will prove simpler (even if i end up needing different testing environments, which i don't know)
how much work is actually expected to be done, and done the same way, client and server?
so it's a game framework library, and sometimes people write games in clj and sometimes they write them in cljs
so there isn't a huge amount that needs to switch between the two implementations - but there are things
#+clj (java.util.UUID/randomUUID) #+cljs (let [template "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
interop is fun. it's surprising how little i've needed to think of it either on the JVM or JS
I think I'll take a stab at this test suite that is failing with midje (no idea why really, magic macros are failing with cljc I think), to clojure.test, and see how it feels
It's not such a huge test suite that I can't pick it up and move it again to something else
the type of scenario where the testing framework isn't suited to multiple host envs?
obviously much more difficult, but i'd like a multi-host language to be able to handle that, as much as possible
@markmandel: have a look at Expectations. Uses cljx right now but at least it does both clj and cljs
Jay Fields has always been very responsive to our feedback so I would expect him to be receptive to moving to cljc if that's an obstacle...
@seancorfield So expectations looks interesting, but there is zero mentions of cljs support on the website and/or how to get up and running with it in cljs, which makes me hesitant to adopt it.
I am just a humble beginner in clojure. But coming from a Java background I would say test.check knocked my socks off when it came to writing tests.
@roelof: clojure-cookbook has a chapter on testing that is a good start. https://github.com/clojure-cookbook/clojure-cookbook other than that, the book clojure applied has good stuff on testing as well. http://www.amazon.com/Clojure-Applied-Practitioner-Ben-Vandgrift/dp/1680500740/ref=sr_1_1?ie=UTF8&qid=1448562345&sr=8-1&keywords=clojure+applied
the author of Living Clojure discusses her book in this podcast http://blog.cognitect.com/cognicast/088
oke, I will continue reading brave and I hope when I ends that book , One of the books can be the next one
Having skimmed through both of those books I'd say the cookbook might be more approachable. Clojure Applied is awesome but it has some more advanced material in it.
@seancorfield: I had it all because of a question earlier about a state question for a toy project which I have in mind