8000 Add more tests for active connections function. · clojure/clojurescript@65742a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65742a5

Browse files
author
Brenton Ashworth
committed
Add more tests for active connections function.
1 parent d68ad5e commit 65742a5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/clj/cljs/repl/multi_browser.clj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
clojure.lang.IPersistentMap
3838
(-closed? [this] (:closed this))
39-
4039
)
4140

4241
(defonce
@@ -60,9 +59,12 @@
6059
([m]
6160
(remove (fn [[_ c]] (-closed? c)) m)))
6261

63-
(comment
64-
;; TODO: move to tests
65-
(active-connections {1 {:closed true} 2 {:closed false}})
62+
(comment ;; Tests
63+
(do (assert (= (active-connections {1 {:closed true} 2 {:closed false}})
64+
[[2 {:closed false}]]))
65+
(assert (= (active-connections {1 {:closed true}}) []))
66+
(assert (= (active-connections {}) []))
67+
:ok)
6668
)
6769

6870
(defn- safe-read-string

0 commit comments

Comments
 (0)
0