Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qnkhuat/test-plus
`testing-only` for Clojure.test
https://github.com/qnkhuat/test-plus
Last synced: 7 days ago
JSON representation
`testing-only` for Clojure.test
- Host: GitHub
- URL: https://github.com/qnkhuat/test-plus
- Owner: qnkhuat
- License: mit
- Created: 2022-09-04T04:11:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-18T07:24:09.000Z (about 2 years ago)
- Last Synced: 2024-10-28T13:42:24.637Z (23 days ago)
- Language: Clojure
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Clojars Project](https://clojars.org/com.github.qnkhuat/test-plus/latest-version.svg)](https://clojars.org/com.github.qnkhuat/test-plus)
Do you often have a `deftest` with long and deep `testing` inside, and you wish there is a way you can run one specific `testing` inside it?
If you do, then you should use `test-plus`, it's a drop-in tooling that introduces a new macro `testing-only` that conveniently making Clojure.test to run one single `testing`.
### How to use it?
```clojure
(ns test-namespace
(:require [:clojure.test :as t]
[test-plus.core :as test-plus]))(test-plus/install!) ;; this only have to be done once, so you might want to include this in your testing entry
(t/deftest a-big-test
(t/testing "first layer"
(t/testing "second layer"
(t/is (= 2 (inc 1))));; you want only this test to be executed
(t/testing-only "run this only"
(t/is (= 2 (+ 1 1)))(t/testing "And this will be executed too"
(t/is (= 42 (inc 41)))))));; run the test
(t/test-run-var 'a-big-test)
```### Todo
- [ ] supports cljs
- [ ] Better syntax highlighting