我开始学习如何为我的Clojure程序编写测试。
我有一个包含多个断言(调用is
)的测试。
我希望测试在第一个断言失败后立即停止运行。
以下是我的测试:
(deftest register-one-command
(testing "Register-one-command"
(do
(is (= 0 (count @test/list-of-commands)))
(test/add-to-list-of-commands ["A"])
(is (= 1 (count @test/list-of-commands))))))
如果第一个
is
失败,我希望整个过程都会失败。