Skip to content

Commit 465e1fd

Browse files
committed
Improve readme based on previous clojure.test Expectations docs
1 parent 5d937c0 commit 465e1fd

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ A `clojure.test`-compatible version of the [classic Expectations testing library
66

77
This library brings `expect`, `more`, `more-of`, etc from Expectations into the
88
`clojure.test` world to be used instead of (or in addition to) the familiar `is`
9-
macro. You can either use `deftest` from `clojure.test`, or `defexpect` from
9+
macro. This library has no dependencies, other than `clojure.test` itself, and
10+
should be compatible with all existing `clojure.test`-based tooling in editors
11+
and command-line tools.
12+
13+
You can either use `deftest` from `clojure.test`, or `defexpect` from
1014
this library to wrap your tests.
1115

1216
```clojure
@@ -145,6 +149,18 @@ macro). Whilst this goes against the [https://clojure-expectations.github.io/odd
145149
philosophy) that Expectations was created with, it buys us a lot in terms of
146150
tooling support!
147151

152+
## Differences from Expectations
153+
154+
Aside from the obvious difference of providing names for tests -- essential for
155+
compatibility with `clojure.test`-based tooling -- here are the other differences
156+
to be aware of:
157+
158+
* You use standard `clojure.test`-based tooling -- `lein test`, `boot test`, and [Cognitect's `test-runner`](https://github.com/cognitect-labs/test-runner) -- instead of the Expectations-specific tooling.
159+
* Because of that, tests run when you decide, not at the end of the JVM (as happens with Expectations).
160+
* Instead of the `in-context`, `before-run`, `after-run` machinery of Expectations, you can just use `clojure.test`'s fixtures machinery (`use-fixtures`).
161+
* Instead of Expectations' concept of "focused" test, you can use metadata on tests and tell your test runner to "select" tests as needed (e.g., Leiningen's "test selectors", Boot's "filters").
162+
* `freeze-time` and `redef-state` are not (yet) implemented.
163+
148164
## Test & Development
149165

150166
To test, run `clj -A:test:runner`.

0 commit comments

Comments
 (0)