Root directory where screenshots will be saved on failed tests.
Set this to nil in order to disable screenshots.
Root directory where screenshots will be saved on failed tests. Set this to `nil` in order to disable screenshots.
Root directory for saved snapshots from matches-snapshot?
Root directory for saved snapshots from `matches-snapshot?`
(deftest* name & body)Macro that works like deftest from clojure.test. It also surrounds
the test body with try-catch block which captures all thrown CUIC exceptions
and failed is* assertions and tries to take a screenshot from the current
browser window for further inspection.
Macro that works like `deftest` from `clojure.test`. It also surrounds the test body with try-catch block which captures all thrown CUIC exceptions and failed `is*` assertions and tries to take a screenshot from the current browser window for further inspection.
(is* form)Assertion macro that works like is from clojure.test with two differences:
c/wait)cuic.AbortTestError is throw, indicating that test should be aborted
immediately without evaluating any further steps.Normally you should pair this macro with CUIC's deftest* to get screenshot from
the failed page and to suppress extra errors caused by default clojure.test test
reporter.
Assertion macro that works like `is` from `clojure.test` with two differences: * If asserted form returns non-truthy value it will automatically be retried until truthy value is received or timeout exceeds (implicit `c/wait`) * If assertion fails or errors is throw from the assertion, `cuic.AbortTestError` is throw, indicating that test should be aborted immediately without evaluating any further steps. Normally you should pair this macro with CUIC's `deftest*` to get screenshot from the failed page and to suppress extra errors caused by default `clojure.test` test reporter.
(matches-snapshot? snapshot-id actual)Tries to match the given actual data to the snapshot associated to the
given id (keyword). If snapshot does not exist, this function creates it.
All data that can be serialized with pr-str can be tested with snapshot
testing.
Hint: Use fully qualified keyword to distinguish snapshots from different test namespaces. You can also share same snapshots by using same id.
Tries to match the given actual data to the snapshot associated to the given id (keyword). If snapshot does not exist, this function creates it. All data that can be serialized with `pr-str` can be tested with snapshot testing. **Hint:** Use fully qualified keyword to distinguish snapshots from different test namespaces. You can also share same snapshots by using same id.
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 |