-
Notifications
You must be signed in to change notification settings - Fork 42
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
Double-count issue when using two reporters #23
Comments
Because of the way |
I'm using following function in boot-alt-test to combine collection of reporters, should we add this to (defn combined-reporter
"Combines the reporters by running first one directly,
and others with clojure.test/*report-counters* bound to nil."
[report & rst]
(fn [m]
(report m)
(doseq [report rst]
(binding [clojure.test/*report-counters* nil]
(report m))))) |
Update: Ah, never mind, I didn’t read the TP closely enough. I am indeed seeing the same issue with my function. My function(defn- multi-report
"Accepts n reporting functions, returns a reporting function that will call
them all for their side effects and return nil. I tried to just use juxt but
it didn’t work. Maybe because some of the reporting functions provided by
eftest are multimethods, I don’t know."
[& fs]
(fn [event]
(doseq [f fs]
(f event)))) |
Ah, never mind, I didn’t read the TP closely enough. I am indeed seeing the same issue with my function. |
i'm upvoting the need for a duel reporter --> i wanna be able to run lein eftest in my CI that produces a junit report while outputing to console in development. |
I'm attempting to use a custom reporter to report results to both junit and the pretty-printer.
What I've found is that this will double-count the number of assertions and failures. For example:
(Should be 1 assertion per test for 5 total. 1 failure and 1 error.)
A work-around suggested by @miikka is binding clojure.test/*report-counters* to nil for one of the reports:
Which works.
Is there a more proper way of handling this?
The text was updated successfully, but these errors were encountered: