Prepackaged functions that perform common checks.
Prepackaged functions that perform common checks.
(exactly expected)
Checks for equality. Use to avoid default handling of functions.
Checks for equality. Use to avoid default handling of functions.
(FALSEY actual)
Returns precisely true if actual is nil or false.
Returns precisely true if actual is nil or false.
(falsey actual)
Returns precisely true if actual is nil or false.
Returns precisely true if actual is nil or false.
(roughly expected)
(roughly expected delta)
With two arguments, accepts a value within delta of the expected value. With one argument, the delta is 1/1000th of the expected value.
With two arguments, accepts a value within delta of the expected value. With one argument, the delta is 1/1000th of the expected value.
(throws & desiderata)
Checks for a thrown Throwable.
The most common cases are: (fact (foo) => (throws IOException) (fact (foo) => (throws IOException #"No such file")
throws
takes three kinds of arguments:
message
of the Throwable
match the argument.Arguments can be in any order. Except for a class argument, they can be repeated. So, for example, you can write this: (fact (foo) => (throws #"one part" #"another part"))
Checks for a thrown Throwable. The most common cases are: (fact (foo) => (throws IOException) (fact (foo) => (throws IOException #"No such file") `throws` takes three kinds of arguments: * A class argument requires that the Throwable be of that class. * A string or regular expression requires that the `message` of the Throwable match the argument. * A function argument requires that the function, when applied to the Throwable, return a truthy value. Arguments can be in any order. Except for a class argument, they can be repeated. So, for example, you can write this: (fact (foo) => (throws #"one part" #"another part"))
(TRUTHY actual)
Returns precisely true if actual is not nil and not false.
Returns precisely true if actual is not nil and not false.
(truthy actual)
Returns precisely true if actual is not nil and not false.
Returns precisely true if actual is not nil and not false.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close