IGJoshua / farolero

Thread-safe Common Lisp style conditions and restarts for Clojure(Script) and Babashka.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failing tests for interactive debugger

NoahTheDuke opened this issue · comments

commented

Hey there! The two tests for the interactive debugger don't work because *debugging-hook* is set to the throwing-debugger by default. Looks like commit 1135079 is the one that changed this. Should the tests be changed to reflect this?

(t/is (= 17
(with-in-str "0\ny\n(vreset! farolero.core/*place* 17)\n"
(let [x (volatile! nil)]
(with-out-str
(sut/assert @x [x]))
@x)))
"the continue restart allows you to set the value interactively from the debugger"))

(t/is (= :good
(with-in-str "0\n"
(restart-case (do (with-out-str
(sut/error "Some error"))
:bad)
(::sut/continue [] :interactive (constantly nil) :good))))
"invokes the debugger"))

Ah, good catch! These tests should be changed to use with-redefs to test the system debugger. I'll update this tonight, although if they pass after that fix there'll be no need to make a new release.

Fixed on develop!