EXPERIMENTAL. COULD BE CHANGED AT ANY TIME. Please share usage reports at https://github.com/noahtheduke/lazytest/issues
An adaption of the built-in clojure.test framework. To mirror clojure.test, deftest wraps the entire test in a single test-case. testing works the same way as clojure.test/testing, so it does not support metadata selection like lazytest.core/describe. thrown? and thrown-with-msg? must be required to be used as is does not support clojure.test/assert-expr.
Supported clojure.test vars:
Example:
(ns noahtheduke.example-test
  (:require
   [lazytest.experimental.interfaces.clojure-test :refer [deftest are is testing]]))
(deftest deftest-test
  (is true "expect works inside")
  (testing "testing works"
    (is (= 7 (+ 3 4)) "is works"))
  (testing "are works"
    (are [x y] (= x y)
      2 (+ 1 1)
      4 (* 2 2))))
EXPERIMENTAL. COULD BE CHANGED AT ANY TIME. Please share usage reports at https://github.com/noahtheduke/lazytest/issues
An adaption of the built-in `clojure.test` framework. To mirror `clojure.test`, [[deftest]] wraps the entire test in a single test-case. [[testing]] works the same way as `clojure.test/testing`, so it does not support metadata selection like [[lazytest.core/describe]]. [[thrown?]] and [[thrown-with-msg?]] must be required to be used as [[is]] does not support `clojure.test/assert-expr`.
Supported `clojure.test` vars:
* [[deftest]]
* [[testing]]
* [[is]]
* [[are]]
* [[thrown?]]
* [[thrown-with-msg?]]
Example:
```clojure
(ns noahtheduke.example-test
  (:require
   [lazytest.experimental.interfaces.clojure-test :refer [deftest are is testing]]))
(deftest deftest-test
  (is true "expect works inside")
  (testing "testing works"
    (is (= 7 (+ 3 4)) "is works"))
  (testing "are works"
    (are [x y] (= x y)
      2 (+ 1 1)
      4 (* 2 2))))
```
(are argv expr & args)Adapted from clojure.test/are.
Adapted from `clojure.test/are`.
(deftest test-name & body)Adapted from clojure.test/deftest.
Adapted from `clojure.test/deftest`.
(is form)(is form msg)Adapted from clojure.test/is.
Adapted from `clojure.test/is`.
(testing doc & body)Adapted from clojure.test/testing.
Adapted from `clojure.test/testing`.
(thrown-with-msg? c re expr)Adapted from clojure.test/thrown-with-msg?.
Adapted from `clojure.test/thrown-with-msg?`.
(thrown? c expr)Adapted from clojure.test/thrown?.
Adapted from `clojure.test/thrown?`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |