diff --git a/clojure/io/julienvincent/clojure_test/json.clj b/clojure/io/julienvincent/clojure_test/json.clj index 0b57d05..cfe1573 100644 --- a/clojure/io/julienvincent/clojure_test/json.clj +++ b/clojure/io/julienvincent/clojure_test/json.clj @@ -25,8 +25,9 @@ #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (defn load-test-namespaces [] - (doseq [namespace (api.query/get-test-namespaces)] - (require namespace))) + (with-json-out + (doseq [namespace (api.query/get-test-namespaces)] + (require namespace)))) #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (defn run-test [test-sym] diff --git a/lua/clojure-test/api/tests.lua b/lua/clojure-test/api/tests.lua index d1bd5e2..dfdbe33 100644 --- a/lua/clojure-test/api/tests.lua +++ b/lua/clojure-test/api/tests.lua @@ -9,7 +9,9 @@ end, 3) local M = {} function M.load_tests() + vim.notify("Loading tests...", vim.log.levels.INFO) eval.eval(eval.API.load_test_namespaces) + vim.notify("Test namespaces loaded!", vim.log.levels.INFO) end function M.get_all_tests() diff --git a/lua/clojure-test/backends/conjure.lua b/lua/clojure-test/backends/conjure.lua index 4b567b7..9ac11d6 100644 --- a/lua/clojure-test/backends/conjure.lua +++ b/lua/clojure-test/backends/conjure.lua @@ -15,8 +15,14 @@ function M.eval(ns, code, opts) context = ns, code = code, ["passive?"] = true, - ["on-result"] = function(result) - future.set(result) + cb = function(result) + if result.err then + vim.notify(result.err, vim.log.levels.ERROR) + future.set_error(result.err) + end + if result.value then + future.set(result.value) + end end, }) end)