improved output schema
This commit is contained in:
parent
7097edcc77
commit
f3c486a733
1 changed files with 7 additions and 3 deletions
|
@ -27,14 +27,18 @@
|
||||||
(def ^:dynamic
|
(def ^:dynamic
|
||||||
*target-dir* "target/datatest/")
|
*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
|
(s/defn write-data-test-output
|
||||||
[m]
|
[m]
|
||||||
(let [data-spec-file (loader/data-spec-file *data-test-report-context*)
|
(let [data-spec-file (loader/data-spec-file *data-test-report-context*)
|
||||||
output-file (str *target-dir* data-spec-file)]
|
output-file (str *target-dir* data-spec-file)]
|
||||||
(io/make-parents output-file)
|
(io/make-parents output-file)
|
||||||
(spit output-file (merge
|
(spit output-file {:test-event m
|
||||||
{:test-event m}
|
:test-data-spec *data-test-report-context*})))
|
||||||
*data-test-report-context*))))
|
|
||||||
|
|
||||||
(defmethod t/report :default [m]
|
(defmethod t/report :default [m]
|
||||||
(t/with-test-out (prn m)))
|
(t/with-test-out (prn m)))
|
||||||
|
|
Loading…
Reference in a new issue