instrument all test reporters

pull/1/head
jem 5 years ago
parent ce093d4cbf
commit d8c3ee5573

@ -41,6 +41,7 @@
:test-data-spec *data-test-report-context*})))
(defmethod t/report :default [m]
(when *data-test-report-context* (write-data-test-output m))
(t/with-test-out (prn m)))
(defmethod t/report :pass [m]
@ -48,6 +49,7 @@
(t/with-test-out (t/inc-report-counter :pass)))
(defmethod t/report :fail [m]
(when *data-test-report-context* (write-data-test-output m))
(t/with-test-out
(t/inc-report-counter :fail)
(println "\nFAIL in" (t/testing-vars-str m))
@ -57,6 +59,7 @@
(println " actual:" (pr-str (:actual m)))))
(defmethod t/report :error [m]
(when *data-test-report-context* (write-data-test-output m))
(t/with-test-out
(t/inc-report-counter :error)
(println "\nERROR in" (t/testing-vars-str m))

@ -17,7 +17,6 @@
(:require
[clojure.test :refer :all]
[clojure.java.io :as io]
[schema.core :as s]
[data-test.loader :as sut]))
(deftest should-read-test-data-spec

@ -0,0 +1,19 @@
; Licensed to the Apache Software Foundation (ASF) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
; to you under the Apache License, Version 2.0 (the
; "License"); you may not use this file except in compliance
; with the License. You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
(ns data-test.reporter-test
(:require
[clojure.test :refer :all]
[data-test.reporter :as sut]))
Loading…
Cancel
Save