[fix 6051] log error during connexion and pass cofx
Signed-off-by: yenda <eric@status.im>
This commit is contained in:
parent
c289b0bfb2
commit
f6a50b2799
|
@ -46,7 +46,8 @@
|
|||
(receive-message now-in-s chat-id message))
|
||||
(js-array->seq js-messages))]
|
||||
(apply fx/merge cofx receive-message-fxs))
|
||||
(log/error "Something went wrong" js-error js-messages)))
|
||||
(do (log/error "Something went wrong" js-error js-messages)
|
||||
cofx)))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:protocol/receive-whisper-message
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
(deftest receive-whisper-messages-test
|
||||
(testing "an error is reported"
|
||||
(is (nil? (handlers/receive-whisper-messages {:db {}} "error" #js [] nil))))
|
||||
(is (nil? (:chat-received-message/add-fx (handlers/receive-whisper-messages {:db {}} "error" #js [] nil)))))
|
||||
(testing "messages is undefined"
|
||||
(is (nil? (handlers/receive-whisper-messages {:db {}} nil js/undefined nil))))
|
||||
(is (nil? (:chat-received-message/add-fx (handlers/receive-whisper-messages {:db {}} nil js/undefined nil)))))
|
||||
(testing "happy path"
|
||||
(let [actual (handlers/receive-whisper-messages {:db {}} nil messages sig)]
|
||||
(testing "it add an fx for the message"
|
||||
|
|
Loading…
Reference in New Issue