Skip to content

Improve clojure.test support/syntax #90

@seancorfield

Description

@seancorfield

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions