clojure.test support for the root-tool contract, for any IAddon's suite.
(ns my.addon-contract-test (:require [hive-addon.tool-contract.test :refer [deftest-root-tools]] [hive-addon.protocol :as proto] [my.addon :as addon]))
(deftest-root-tools my-addon-root-tools (proto/tools (addon/->addon)))
Each violating tool is one failed assertion naming the tool and the path.
An empty tool seq fails unless :allow-empty? true is passed.
clojure.test support for the root-tool contract, for any IAddon's suite.
(ns my.addon-contract-test
(:require [hive-addon.tool-contract.test :refer [deftest-root-tools]]
[hive-addon.protocol :as proto]
[my.addon :as addon]))
(deftest-root-tools my-addon-root-tools
(proto/tools (addon/->addon)))
Each violating tool is one failed assertion naming the tool and the path.
An empty tool seq fails unless `:allow-empty? true` is passed.(assert-root-tools tools)(assert-root-tools tools {:keys [allow-empty?]})Run the contract over tools as clojure.test assertions. Returns the report.
Run the contract over `tools` as clojure.test assertions. Returns the report.
(deftest-root-tools name tools-expr & {:as opts})Define deftest name asserting that every tool def tools-expr evaluates
to satisfies the root-tool contract. Options: :allow-empty? (default false).
Define deftest `name` asserting that every tool def `tools-expr` evaluates to satisfies the root-tool contract. Options: :allow-empty? (default false).
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 |