dda-backup/test/practicalli/playground_test.clj

28 lines
990 B
Clojure
Raw Normal View History

2024-08-16 06:29:49 +00:00
;; ---------------------------------------------------------
;; practicalli.playground.-test
;;
;; Example unit tests for practicalli.playground
;;
;; - `deftest` - test a specific function
;; - `testing` logically group assertions within a function test
;; - `is` assertion: expected value then function call
;; ---------------------------------------------------------
(ns practicalli.playground-test
(:require
[clojure.test :refer [deftest is testing]]
[practicalli.playground :as playground]))
(deftest application-test
(testing "TODO: Start with a failing test, make it pass, then refactor"
;; TODO: fix greet function to pass test
(is (= "practicalli application developed by the secret engineering team"
(playground/greet)))
;; TODO: fix test by calling greet with {:team-name "Practicalli Engineering"}
(is (= (playground/greet "Practicalli Engineering")
"practicalli service developed by the Practicalli Engineering team"))))