exercism / exercism/clojure-test-runner

Support console output - Switch to Kaocha?

Offen
#49 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Clojure
Sterne
2
Forks
10
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I was looking into what it would take to support printing console output, since this is a common thing people try to do and currently makes the whole test run error without any meaningful message.

While searching for how to capture stdout during a test run, I stumbled upon this: https://github.com/lambdaisland/kaocha/blob/main/doc/plugins/capture_output.md

In other words, it supports that out of the box. And from the looks of it, I think I would rather just use Kaocha than figure out how to do that with our current setup.

I had previously looked into Kaocha when I was choosing a testing framework, and it has another compelling advantage: It has an option to *not* randomize the testing order, which is exactly what we need!

So why didn't I decide to use it? Because it ran on the JVM, so it was worth avoiding it to gain the quick startup time of Babashka.

This had the unfortunate side effect of me having to actually parse the test files in order to determine the order they are defined, simply to defeat the behavior of clojure.test randomizing the test runs. It's kind of ridiculous, actually, but I couldn't figure out any other way to do it.

But now, Kaocha is [compatible with Babashka](https://github.com/lambdaisland/kaocha/tree/main#babashka), so it ticks all of the boxes.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.