Re: cljs.test :after fixture not called if test errors

2020-11-24 Thread Stuart Campbell
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

Re: cljs.test :after fixture not called if test errors

2020-11-24 Thread Estevo U. C. Castro
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

cljs.test :after fixture not called if test errors

2020-11-24 Thread Stuart Campbell
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