simplify. remove tick
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
(is (= [:batch] (tui/batch))))
|
||||
|
||||
(testing "batch with many commands"
|
||||
(let [cmd (tui/batch (tui/tick 1) (tui/tick 2) (tui/tick 3) (tui/tick 4) (tui/tick 5))]
|
||||
(let [cmd (tui/batch (tui/after 1 :t1) (tui/after 2 :t2) (tui/after 3 :t3) (tui/after 4 :t4) (tui/after 5 :t5))]
|
||||
(is (= 6 (count cmd))) ; :batch + 5 commands
|
||||
(is (= :batch (first cmd))))))
|
||||
|
||||
@@ -209,12 +209,22 @@
|
||||
(testing "sequentially with no arguments"
|
||||
(is (= [:seq] (tui/sequentially)))))
|
||||
|
||||
(deftest tick-edge-cases-test
|
||||
(testing "tick with zero"
|
||||
(is (= [:tick 0] (tui/tick 0))))
|
||||
(deftest after-edge-cases-test
|
||||
(testing "after with zero delay"
|
||||
(let [cmd (tui/after 0 :immediate)]
|
||||
(is (fn? cmd))
|
||||
;; Zero delay executes immediately
|
||||
(is (= :immediate (cmd)))))
|
||||
|
||||
(testing "tick with very large value"
|
||||
(is (= [:tick 999999999] (tui/tick 999999999)))))
|
||||
(testing "after with various delays creates function"
|
||||
;; Don't invoke - just verify the function is created correctly
|
||||
(is (fn? (tui/after 1 :t1)))
|
||||
(is (fn? (tui/after 1000 :t2)))
|
||||
(is (fn? (tui/after 999999999 :t3))))
|
||||
|
||||
(testing "after with complex message"
|
||||
(let [cmd (tui/after 0 [:tick {:id 1 :data [1 2 3]}])]
|
||||
(is (= [:tick {:id 1 :data [1 2 3]}] (cmd))))))
|
||||
|
||||
(deftest send-msg-edge-cases-test
|
||||
(testing "send-msg with nil"
|
||||
|
||||
Reference in New Issue
Block a user