Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve clojure.test support/syntax #90

Closed
seancorfield opened this issue Jul 25, 2017 · 1 comment
Closed

Improve clojure.test support/syntax #90

seancorfield opened this issue Jul 25, 2017 · 1 comment

Comments

@seancorfield
Copy link
Contributor

Right now, the only possible forms are:

(defexpect my-test1 expected actual)
(defexpect my-test2
  (expect expected1 actual1)
  (expect expected2 actual2)
  ...
  (expect expectedN actualN))

You cannot intersperse other code, like you can with clojure.test's is macro and you can't wrap the expect forms in setup or teardown code.

Also, completely undocumented, you can also do this which was never intentional:

(defexpect my-test3
  expected1 actual1
  expected2 actual2
  ...
  expectedN actualN)

I'd like to treat the first case as a special case (and expand it specifically as if it were (defexpect my-test1 (expect expected actual))) and eliminate the third case. The body would then be walked to expand any expect forms found.

@seancorfield
Copy link
Contributor Author

Implemented in 2.2.0-beta2 as an experimental feature pending more testing in the wild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant