Back

with-tap-output (clj)

(source)

macro

(with-tap-output & body)
Execute body with modified test reporting functions that produce TAP output

Examples

frenchy64/fully-satisfies
(ns io.github.frenchy64.fully-satisfies.non-leaky-macros.clojure.test.tap
  "Implementations of clojure.test.tap macros that don't leak implementation details."
  (:require [clojure.test.tap :as tap]))

(defmacro non-leaky-with-tap-output
  "Like clojure.test.tap/with-tap-output, except body does not leak try/catch syntax."
  [& body]
  `(tap/with-tap-output
     (do ~@body)))

(defmacro with-tap-output
  [& body]
  `(non-leaky-with-tap-output ~@body))