weavejester / eftest

Fast and pretty Clojure test runner
424 stars 40 forks source link

Does eftest has the support of global fixtures? #78

Open alekseysotnikov opened 4 years ago

alekseysotnikov commented 4 years ago

Like in circleci.test https://github.com/circleci/circleci.test#global-fixtures

How can I define global fixtures that are only run once for the entire test run? I just need an idea.

weavejester commented 4 years ago

No, not currently. However the original author of fixtures now thinks there are better alternatives to them.

frenchy64 commented 2 years ago

How can I define global fixtures that are only run once for the entire test run? I just need an idea.

Try Leiningen's :injections keyword and enable it when you call eftest.

lein with-profile +test-injections eftest
(defproject ..
  :profiles {:test-injections {:injections [(prn "hello")]}})