Unit tests with specsλ︎
Now that customer data and account-holder data has a specification, we can use the clojure.spec.alpha/valid?
in the unity test code, as that function returns true or false.
In this example the result of a call to register-account-holder
is checked to see if it is valid against the ::account-holder
specification. This simplifies the code needed in unit test assertions, as Clojure spec is doing the work.