NOTE: Since Clojars introduced a Verified Group Names policy, no new libraries could be pushed to the
expectations
group, anddoo
filters out JAR artifacts that beginclojure-
for self-hosted ClojureScript environments (i.e.,planck
), so continuing to useclojure-test
for the artifact name is not viable. Accordingly, the 2.x versions of this library are published ascom.github.seancorfield/expectations
.
Only accretive/fixative changes will be made from now on.
-
2.1.next in progress
- Address #36 by expanding
side-effects
documentation, and mentioningwith-redefs
. - Expose
run-test
andrun-test-var
fromclojure.test
(Clojure 1.11). - Update dev/test dependencies.
- Address #36 by expanding
-
2.1.201 --2024-05-07
-
2.1.188 -- 2023-10-22
- Address #29 by providing a "hook" for
more-of
. - Update
tools.build
to 0.9.6 (and get rid oftemplate/pom.xml
in favor of new:pom-data
option tob/write-pom
).
- Address #29 by providing a "hook" for
-
2.1.182 -- 2023-09-29
- Improved failure reporting: most failures now provide an additional message describing the failure as well as improving how the expected and actual values are displayed (primarily hiding
=?
and showing a more accurate/intuitive test form). - Update
deps.edn
to use:main-args
(instead of:main-opts
) for parameterized tasks inbuild.clj
-- see Running Tasks based on Aliases - Drop support for Java 8 (it may continue to work but it is no longer tested).
- Update dependencies to latest stable versions.
- Improved failure reporting: most failures now provide an additional message describing the failure as well as improving how the expected and actual values are displayed (primarily hiding
-
2.0.165 -- 2023-01-31
-
2.0.160 -- 2022-03-26
- Fix #28 by recognizing qualified calls to
expect
(to suppress legacy behavior in more cases). - Update
build-clj
to v0.8.0.
- Fix #28 by recognizing qualified calls to
-
2.0.157 -- 2022-01-25
- Fix a small regression in how classes are treated when used as predicates in
expect
.
- Fix a small regression in how classes are treated when used as predicates in
-
2.0.156 -- 2022-01-19
-
2.0.143 -- 2021-12-01
- Fix #23 by adding support for set-
in
-set expectations. - Documentation updates.
- Build deps updates.
- Fix #23 by adding support for set-
-
2.0.137 -- 2021-11-07
- Address #22 by adding
clj-kondo.exports
(this is just a first pass; the:lint-as
mappings will probably be replaced by hooks in the future). - Fix #19 by supporting regex/patterns dynamically inside
=?
(as well as the compile-time support already inexpect
). - Update
build-clj
to v0.5.0. - Switch to
build.clj
/tools.build
for CI/deploy.
- Address #22 by adding
-
2.0.0-alpha2 -- 2021-06-09
- Mostly a documentation refresh, compared to Alpha 1.
-
2.0.0-alpha1 -- 2021-06-05
- Make
(defexpect foo)
and(defexpect foo (bar))
match the behavior ofdeftest
, without wrapping the body in(expect ,,,)
. This is potentially breaking insofar as(defexpect foo (produces-falsey))
would have been a failing test in 1.x but now silently just runs(produces-falsey)
in the same way that(deftest foo (produces-falsey))
does. - Bring in several test-running functions from
clojure.test
, for convenience in dev/test so users don't need to requireclojure.test
as well. - Implement
cljs.test
's version ofuse-fixtures
: accepts functions or hash maps (containing:before
and/or:after
keys with 0-arity functions). - Add various macro-like constructs back into the source code to improve the documentation (
in
,from-each
,more-of
,more->
,more
are really only syntactic constructs insideexpect
). - Support (self-hosted) ClojureScript via
planck
-- see #16 for details (@kkinear).
- Make
These versions required users to also require clojure.test
and were not as
directly comparable to clojure.test
behaviors.
-
1.2.1 -- 2019-12-09
- Fix cljdoc.org index (Collections was missing).
-
1.2.0 -- 2019-12-09
- Improve failure reporting for
in
; allow it to be combined withmore
etc. #11 - Add support for mocking return values in
side-effects
. - Add support for optional message argument in
expect
. #9 - Added article-style documentation for cljdoc.org. #6, #7, #8, #10
- Add example of
more->
equivalent tothrown-with-msg?
. #5
- Improve failure reporting for
-
1.1.2 -- 2019-12-07
- Adds
between
andbetween'
for inclusive and exclusive range checking. - Fix
in
with a hash map to correctly detect failing cases. - Add a first round of tests (finally!). Verified support for Clojure 1.8 (without Spec expectations). Verified full support for Clojure 1.9 and 1.10.1.
- Clean up
:require
..:refer
in README to list all public symbols. #4 - Fixes links in README. PR #3 (@marekjeszka)
- Add/improve docstrings. Add
^:no-doc
metadata for cljdoc.org.
- Adds
-
1.1.1 -- 2019-01-14
- An expectation can now use a qualified keyword spec to test conformance of the actual value. Failures are reported with the spec explanation. #2
- If Paul Stadig's Humane Test Output is available (on the classpath), failure reporting is automatically made compatible with it. Expectations that use data structure "equality" (the
=?
extension tois
) will produce "humane" output for failures, showing differences. #1
-
1.1.0 -- 2019-01-08
- (broken version)
-
1.0.1 -- 2019-01-02
- Initial version