NOTE: Since Clojars introduced a Verified Group Names policy, no new libraries could be pushed to the
expectationsgroup, anddoofilters out JAR artifacts that beginclojure-for self-hosted ClojureScript environments (i.e.,planck), so continuing to useclojure-testfor 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.3.next in progress
- Address #42 by removing support for the implicit
expectform ofdefexpect. This was deprecated in 2.2.214. In 2.3.next, an exception is thrown. - Updated dev/test dependencies.
- Address #42 by removing support for the implicit
-
2.2.214 -- 2024-12-13
- Address #41 by deprecating the implicit
expectform ofdefexpectand printing an obnoxious warning when it is used. This form ofdefexpectwill be removed in a future release! - PR #40 @NoahTheDuke reduces the amount of code generated for
?=(and, in turn, formore-of), allowing for more complex tests.
- Address #41 by deprecating the implicit
-
2.1.208 -- 2024-11-21
- Address #39 by ignoring qualifier on Expectations' macros. This is potentially breaking but is often required during migration to another test framework, as you may have to use aliased names to avoid collisions (to LazyTest, for example).
- Address #36 by expanding
side-effectsdocumentation, and mentioningwith-redefs. - Expose
run-testandrun-test-varfromclojure.test(Clojure 1.11). - Update dev/test dependencies.
-
2.1.201 -- 2024-05-07
-
2.1.188 -- 2023-10-22
- Address #29 by providing a "hook" for
more-of. - Update
tools.buildto 0.9.6 (and get rid oftemplate/pom.xmlin favor of new:pom-dataoption 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.ednto 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-cljto 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-asmappings 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-cljto v0.5.0. - Switch to
build.clj/tools.buildfor 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.testas well. - Implement
cljs.test's version ofuse-fixtures: accepts functions or hash maps (containing:beforeand/or:afterkeys with 0-arity functions). - Add various macro-like constructs back into the source code to improve the documentation (
in,from-each,more-of,more->,moreare 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 withmoreetc. #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
betweenandbetween'for inclusive and exclusive range checking. - Fix
inwith 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..:referin README to list all public symbols. #4 - Fixes links in README. PR #3 (@marekjeszka)
- Add/improve docstrings. Add
^:no-docmetadata 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