This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-16
Channels
- # aws-lambda (1)
- # bangalore-clj (2)
- # beginners (121)
- # boot (23)
- # cljs-dev (165)
- # cljsrn (8)
- # clojars (2)
- # clojure (164)
- # clojure-berlin (6)
- # clojure-chicago (3)
- # clojure-italy (5)
- # clojure-nl (1)
- # clojure-russia (4)
- # clojure-serbia (32)
- # clojure-sg (1)
- # clojure-spec (8)
- # clojure-uk (55)
- # clojurescript (94)
- # cursive (21)
- # datomic (30)
- # events (1)
- # hoplon (6)
- # jobs (1)
- # keechma (1)
- # liberator (2)
- # luminus (8)
- # off-topic (48)
- # om (12)
- # onyx (24)
- # parinfer (15)
- # pedestal (8)
- # re-frame (4)
- # sql (18)
- # test-check (31)
- # unrepl (70)
- # untangled (21)
I'm looking for some guidance on how to get a good testing story going. I am less interested in UI testing, more interested in just general unit testing of my re-frame event handlers and subscriptions. I've looked at re-frame-test
and lein-doo
, but neither of these projects has documentation specific to react-native. My guess is that either 1) no one is writing tests for rn, or 2) there are no fundamental differences to configure testing for re-natal as opposed to compiling for browser use. Can anyone give me some guidance on this, or resources I can use to learn more?
localshred: We’re using re-frame-test and doo. But had to do some custom things to get it to work for the RN code. But we run the tests in node which is nice
@U0AU4CPTN ooh I'm just about to start looking at doing exactly this, this morning - was it difficult to get working? What kinda custom stuff did you have to do
@U051H1KL1 re-frame-test works well, and unit tests in doo are very straightforward. The tricky part is mocking out js/require calls, for that we use https://github.com/mfncooper/mockery and https://github.com/RealOrangeOne/react-native-mock
ah cool thanks again for your tips!
@U051H1KL1 Good luck, I’d also look at this for real UI tests: https://github.com/facebook/react/tree/master/packages/react-test-renderer
I used the setup from this project I found on github to get things going https://github.com/areina/elfeed-cljsrn/blob/master/project.clj
but in the end ran into parser errors when I'd try to run the test commands (can't create ISeq from Keyword line 1 column 1 of the test file)