Interactive REPL Tests
Clojure programmers often work interactively at a REPL to develop functions. The workflow consists of writing a function either in the REPL or in a namespace editor, evaluating that code, and executing that code with sample inputs. Often we visually inspect the results, sometimes saving them so we can perform more detailed checks of their behavior.
The next question is whether the inputs and expected outputs are worth capturing into a test that can run all the time. Some things to consider are:
-
Is the test checking business logic or verifying the behavior of chaining together standard Clojure functions? Tests for the logic of your application are almost certainly worth keeping. Simple uses of Clojure itself (say, a function ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access