quickblog
quickblog copied to clipboard
Can't run a single test with bb test --only
I should be able to run a single test using --only
, like so:
bb test --only quickblog.api-test/migrate
However, bb test
ignores the --only
arg and happily runs all the tests, thus making me sad:
$ bb test --only quickblog.api-test/migrate
Running tests in #{"test"}
Testing quickblog.api-test
Ran 5 tests containing 138 assertions.
0 failures, 0 errors.
I would expect a single test with 1 assertion to run, given quickblog.api-test/migrate
:
(deftest migrate
(with-dirs [posts-dir]
(let [posts-edn (write-test-file posts-dir "posts.edn"
{:file "test.md"
:title "Test post"
:date "2022-01-02"
:tags #{"clojure"}})
post-file (write-test-file posts-dir "test.md"
"Write a blog post here!")
to-lines #(-> % str/split-lines set)]
(api/migrate {:posts-dir posts-dir
:posts-file posts-edn})
(is (= (to-lines "Title: Test post\nDate: 2022-01-02\nTags: clojure\n\nWrite a blog post here!")
(to-lines (slurp post-file)))))))