27 lines
990 B
Clojure
27 lines
990 B
Clojure
;; ---------------------------------------------------------
|
|
;; 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"))))
|