Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run a single test with bb test --only #92

Open
jmglov opened this issue Feb 15, 2024 · 0 comments
Open

Can't run a single test with bb test --only #92

jmglov opened this issue Feb 15, 2024 · 0 comments

Comments

@jmglov
Copy link
Contributor

jmglov commented Feb 15, 2024

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)))))))
@jmglov jmglov mentioned this issue Feb 15, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant