Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Jovial should call all reporting hooks that clojure.test does #23

@ajoberstar

Description

@ajoberstar

Jovial currently creates a pretty simple reporter that focuses on printing exceptions to the output stream. Because of this we didn't bother calling (do-report ...) in all of the places clojure.test does, which prevents a custom reporter from handling those event types.

Discussed in clojurephant/clojurephant#214

Originally posted by ngrewe February 17, 2024
Hi folks,

I'm porting an older project that previously relied on the clojuresque gradle plugin to clojurephant, and I'm running into a bit of a problem with the JUnit integration. My test suite defines a custom report hook for :end-test-var. When I execute the test suite in IntelliJ using Cursive, that method instead gets called as expected, but when executing ./gradlew test (using the Jovial integration), it isn't called. Can anybody point me towards why that might be happening and how to fix it? I've already tried using (defmethod dev.clojurephant.jovial.engine.clojure-test/jovial-report :end-test-var …) instead of (defmethod clojure.test/report :end-test-var …), but to no avail.

Thanks,

Niels

Implementation

Looks like (at a minimum) we'll need to replicate how clojure.test calls begin/end around testing the var. I think we'd just need to add it in here.

Open to suggestions on if/how we make this extensible for end users. The (defmethod dev.clojurephant.jovial.engine.clojure-test/jovial-report :end-test-var …) that you tried is the most straightforward, but I hadn't originally intended to have a public API surface to jovial, because ideally running your test via jovial would not impact what you write in your tests. But if there's not a better way to do it transparently, that could still be an option.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions