Fork me on GitHub
#re-frame
<
2015-07-21
>
mikethompson01:07:57

Can't see how it will have anything to the value or type or name

mikethompson01:07:21

It will be because the namespace, in which the handler is registered, is not requireed.

mikethompson01:07:40

Unless you actively require that namespace somewhere, the cljs dependency mechanism won't know it has to be loaded. And if it isn't loaded, then the registration won't be made. And then later when you dispatch, you'll be told the handler was never registered

coyotespike02:07:01

Hmm. I've required that namespace, handlers.cljs, in my core.cljs for that reason. And all the other handlers (written identically) are working well.

mikethompson03:07:20

But does core.cljs get required for tests? (In order for it to trigger handlers.cljs)

mikethompson03:07:50

Put a (.log js/console "here") in handler.cljs to be sure?

mikethompson03:07:58

I'm hammering away at this because your symptoms perfectly match somehow never registering the handler.

mikethompson03:07:16

And any thoughts that this being related to a type or name don't seem to make sense

coyotespike04:07:56

I appreciate your hammering away! Any information is great.

coyotespike04:07:17

Now that you mention it, lein test just runs Clojure tests, and gives that warning. lein cljsbuild test runs my ClojureScript test - and I'm directly testing that handler with no issues.

coyotespike04:07:25

Also, that's the handler I most recently wrote. So perhaps the Clojure side just hasn't gotten with the program yet?