That unfortunately doesn't work for async tests, which require the map
fixture style (with :before/:after keys).
On Tue, 24 Nov 2020 at 21:23, Estevo U. C. Castro
wrote:
> Try
>
> (use-fixtures :once
> (fn [f]
> (println "before")
> (try (f)
> (finally (println "after")
>
> O
Try
(use-fixtures :once
(fn [f]
(println "before")
(try (f)
(finally (println "after")
O mércores, 25 de novembro de 2020 á/s 00:17:03 UTC+1,
stuart.will...@gmail.com escribiu:
> Hello,
>
> I'm experimenting with fixtures and it seems like :after fixtures aren't
> run if
Hello,
I'm experimenting with fixtures and it seems like :after fixtures aren't
run if a test unexpectedly errors. E.g.:
(use-fixtures :once {:before #(println "before")
:after #(println "after")})
(deftest a-test
(raise (js/Error. "oops")))
In this example I expected to