Last active
September 2, 2019 13:38
-
-
Save mikeananev/9f0483c536f70f2b55b839a248a375cd to your computer and use it in GitHub Desktop.
transcriptor example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;deps.edn | |
{:deps { :xr-test {:extra-deps { com.cognitect/transcriptor {:mvn/version "0.1.5"}} | |
:extra-paths ["test" "test/resources"] | |
:main-opts ["--main" "repl-runner"]}}} | |
;; test/repl_runner.clj | |
(ns repl-runner | |
(:require [cognitect.transcriptor :as xr])) | |
(defn -main [] | |
(println "***************************************") | |
(println "running tests at" | |
(.format (java.time.LocalDateTime/now) | |
(DateTimeFormatter/ofPattern "yyyy-MM-dd HH:mm:ss"))) | |
(println "***************************************") | |
(doseq [repl-file (xr/repl-files "test/repls")] | |
(xr/run repl-file))) | |
;; test/repls/my/ns/core.clj | |
(require '[cognitect.transcriptor :as xr] | |
'[clojure.spec.alpha :as s] | |
'[my.ns.core :as m]) | |
(+ 2 3) | |
(xr/check! #{5}) | |
(m/my-fn-returns-vector) | |
(xr/check! vector?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment