Skip to content

Commit

Permalink
Fix filesize test in ClojureScript
Browse files Browse the repository at this point in the history
  • Loading branch information
hlship committed Jul 6, 2023
1 parent 37d5e47 commit bf3c169
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/clj_commons/humanize_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@

(deftest filesize-test
(let [f (fn [input binary format]
(filesize input
(cond-> {}
binary (assoc :binary true)
format (assoc :format format))))]
(apply filesize input
(cond-> []
binary (conj :binary true)
format (conj :format format))))]
(are [input binary format expected] (is (= expected (f input binary format)))
0 nil nil "0"
300 nil nil "300.0B"
Expand Down

0 comments on commit bf3c169

Please sign in to comment.