Last active
November 5, 2019 15:37
-
-
Save nikolavojicic/a5091a1363a4fa12b7d39f942f96f71a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Vanilla | |
(defn is* | |
[results] | |
(assert (seq results)) | |
(test/is | |
(if (some? :failure results) | |
(do | |
(println "\nFailed specs:") | |
(doseq [{:keys [sym failure]} results | |
:when failure] | |
(println sym) | |
(pprint/pprint | |
(or (ex-data failure) failure)))) | |
true))) | |
;; With Expound | |
(defn is* | |
[results] | |
(assert (seq results)) | |
(test/is | |
(if (some :failure results) | |
(exp/explain-results results) | |
true))) | |
;; Usage | |
(is* (stest/check `ns/fn)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment