File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
src/clojure_mcp/tools/eval
test/clojure_mcp/tools/eval Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 7272 session-type (or session-type :default )
7373 conn (nrepl/open-connection nrepl-client)]
7474
75- ; ; Push to eval history if available
76- (when-let [state (::nrepl/state nrepl-client)]
77- (swap! state update :clojure-mcp.repl-tools/eval-history conj form-str))
78-
7975 (try
8076 (let [session-id (nrepl/ensure-session nrepl-client conn session-type)
8177 eval-id (nrepl/new-eval-id )
Original file line number Diff line number Diff line change 101101
102102 (testing " Evaluation with error"
103103 (let [result (test-tool-execution " (throw (Exception. \" test error\" ))" )]
104- (is (false ? (:error? result)))
104+ (is (true ? (:error? result)))
105105 (is (= 1 (count (:result result))))
106106 (is (str/includes? (first (:result result)) " test error" ))
107107 (is (str/includes? (first (:result result)) " Execution error" ))))
123123 (testing " Evaluation with runtime error (no pre-evaluation linting)"
124124 ; ; With delimiter-only checking, syntax errors are caught at runtime
125125 (let [result (test-tool-execution " (def ^:dynamic 1)" )]
126- (is (false ? (:error? result)))
126+ (is (true ? (:error? result)))
127127 (is (= 1 (count (:result result))))
128128 ; ; Should have error from evaluation, not from linting
129129 (is (str/includes? (first (:result result)) " Syntax error" )))))
You can’t perform that action at this time.
0 commit comments