This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-06
Channels
- # announcements (69)
- # aws-lambda (3)
- # babashka (45)
- # beginners (28)
- # calva (4)
- # clara (7)
- # clojure (23)
- # clojure-spec (5)
- # clojure-uk (18)
- # clojurescript (57)
- # clojutre (1)
- # cursive (20)
- # datomic (31)
- # emacs (5)
- # figwheel-main (3)
- # fulcro (16)
- # graalvm (7)
- # luminus (4)
- # nrepl (9)
- # off-topic (50)
- # re-frame (8)
- # reitit (2)
- # rewrite-clj (10)
- # shadow-cljs (88)
- # spacemacs (1)
- # sql (6)
- # vim (2)
Hey all I am trying use re-frame-test
to test the re-frame-async-flow-fx
I have for my Auth flow. The problem is that whenever shadow-cljs hot-reloads the page when a test file changes I get a whole bunch of
re-frame: overwriting :event handler for: :auth/flow
re-frame: overwriting existing post event call back with id: :auth/flow
re-frame: no :event handler registered for: :auth/flow
on each reloadand the number of those lines increases by 1 each time e.g.
re-frame: overwriting :event handler for: :auth/flow
re-frame: overwriting :event handler for: :auth/flow
re-frame: overwriting existing post event call back with id: :auth/flow
re-frame: overwriting existing post event call back with id: :auth/flow
re-frame: no :event handler registered for: :auth/flow
re-frame: no :event handler registered for: :auth/flow
it seems like shadow doesn't realize this one test is in fact one test and keeps making a new test each time it runs
so I am little lost by the magic of what is happening inside run-test-async
and wait-for
The warnings is ok for reloading, but the increasing is not. Does your async-flow-fx
have an id
?
Looks like the registration of async flow is happening each time, but the reason is not clear.
You could look into https://github.com/Day8/re-frame-async-flow-fx/blob/master/test/day8/re_frame/async_flow_fx_test.cljs, maybe it contains some kind of hints on how to test async-flow-fx