Last active
November 6, 2016 15:20
-
-
Save micha/138c6bcc2e862346b133c278574a7a12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deftest bind-events | |
(let [c (j/cell nil) | |
f #(reset! c true) | |
i (h/div :click f)] | |
(-> js/document .-body (.appendChild i)) | |
(with-dom i | |
; Native event. | |
(is (nil? @c)) | |
(.dispatchEvent i (js/Event. "click")) | |
(is (= true @c))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment