-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Two JS objects or arrays with =? contents should be =?.
Deep comparison on JS objects is intractable, but we can support the obvious cases of vanilla objects and arrays. If the constructor on either side is something else (like a custom class) then it can be always false.
;; I want to write this.
(deftest slick-test
(is (=? #js {:abc 7, :xyz {:some "Clojure map"}}
(a-function 7))))
;; Instead I have to write this.
(deftest clunky-test
(let [js-blob (a-function 7)]
(is (=? 7 (.-abc js-blob)))
(is (=? {:some "Clojure map"} (.-xyz js-blob)))))Metadata
Metadata
Assignees
Labels
No labels