Given the active line and a result, complete the line with the status
message and colorize appropriately.
(defn result-string
"Given the active line and a result, complete the line with the status
message and colorize appropriately."
[line result]
(let [message-depth (inc (count (:context result)))]
(cond
(fail? result) (failure-string (str line " FAILED\n" (indent-lines message-depth (default-fail-message result))))
(error? result) (error-string (str line " ERROR\n" (indent-lines message-depth (default-error-message result))))
(pending? result) (pending-string (str line " PENDING\n"))
:default (success-string line))) )
Comments top
No comments for result-string. Log in to add a comment.