【发布时间】:2020-03-28 21:55:51
【问题描述】:
当我在 cider 中的 core_test.clj 文件中运行测试时,每当我加载缓冲区时,测试运行都没有问题,因为我已经设置了 (cider-auto-test-mode 1)。但这不适用于 cljs 文件。我在 core_test.cljs 中有以下代码
(ns myapp.core-test
(:require
[cljs.test :refer-macros [is deftest]]))
(deftest my-test
(testing "Arithmetic"
(testing "with positive integers"
(is (= 4 (+ 2 2)))
(is (= 7 (+ 3 4))))
(testing "with negative integers"
(is (= -4 (+ -2 -2)))
(is (= -1 (+ 3 -4))))))
然后在 core.cljs 中执行 C-k。测试不运行。为什么会这样?如何让 cljs 测试也像 clj 测试一样自动化?
【问题讨论】:
标签: testing clojure clojurescript