From f3c486a733d84b07d1c9cb7bbd118fa3e3f93302 Mon Sep 17 00:00:00 2001 From: jem Date: Wed, 29 May 2019 19:18:26 +0200 Subject: [PATCH] improved output schema --- main/src/data_test/reporter.clj | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main/src/data_test/reporter.clj b/main/src/data_test/reporter.clj index 6a3b098..19408cb 100644 --- a/main/src/data_test/reporter.clj +++ b/main/src/data_test/reporter.clj @@ -27,14 +27,18 @@ (def ^:dynamic *target-dir* "target/datatest/") +;TODO: replace schema with spec +(def TestDataReport + {:test-event s/Any + :test-data-spec s/Any}) + (s/defn write-data-test-output [m] (let [data-spec-file (loader/data-spec-file *data-test-report-context*) output-file (str *target-dir* data-spec-file)] (io/make-parents output-file) - (spit output-file (merge - {:test-event m} - *data-test-report-context*)))) + (spit output-file {:test-event m + :test-data-spec *data-test-report-context*}))) (defmethod t/report :default [m] (t/with-test-out (prn m)))