You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,11 @@ A `clojure.test`-compatible version of the [classic Expectations testing library
6
6
7
7
This library brings `expect`, `more`, `more-of`, etc from Expectations into the
8
8
`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
10
14
this library to wrap your tests.
11
15
12
16
```clojure
@@ -145,6 +149,18 @@ macro). Whilst this goes against the [https://clojure-expectations.github.io/odd
145
149
philosophy) that Expectations was created with, it buys us a lot in terms of
146
150
tooling support!
147
151
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.
0 commit comments