mirror of https://github.com/status-im/reagent.git
add test for cursor variadic swap!
This commit is contained in:
parent
1363e05e62
commit
e8cd105348
|
@ -336,6 +336,12 @@
|
|||
(is (= (get-in @test-atom [])
|
||||
{:z 3}))
|
||||
|
||||
(reset! test-cursor {}) ;; empty map
|
||||
(swap! test-cursor assoc :x 1 :y 2 :z 3 :w)
|
||||
(is (= @test-cursor {:x 1 :y 2 :z 3 :w nil}))
|
||||
(is (= (get-in @test-atom [:a :b :c :d])
|
||||
{:x 1 :y 2 :z 3 :w nil}))
|
||||
|
||||
(is (= runs (running)))))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue