(ns build (:refer-clojure :exclude [test]) (:require [clojure.tools.build.api :as b] [clojure.tools.deps :as t])) (defn test "Run all the tests." [_opts] (println "\nRunning tests...") (let [basis (b/create-basis {:aliases [:eftest]}) combined (t/combine-aliases basis [:eftest]) cmds (b/java-command {:basis basis :java-opts (:jvm-opts combined) :main 'logseq.e2e.core ;; :main-args ["-m" "cognitect.test-runner"] }) {:keys [exit]} (b/process cmds)] (when-not (zero? exit) (throw (ex-info "Tests failed" {})))))