Fork me on GitHub
#testing
<
2022-03-28
>
plexus14:03:45

Hey folks, I've been working recently on a test factory library, and just put out a first release. It's still very early days but it's ready for people to take it for a test run. https://github.com/lambdaisland/facai

🚀 2
plexus14:03:50

Talking to both clients and individuals it seemed several people were missing something like this, especially those that had worked with something similar in other languages (e.g. FactoryBot in Ruby). If that's you then I definitely would love to hear from you!

plexus14:03:33

Part of the value of something like this is that it integrates easily with the database, but sadly things aren't exactly standardized when it comes to mapping clojure data to relational tables. Datalog dbs are a bit easier. We've added an initial implementation of next.jdbc and datomic support, and tried to make especially the jdbc support configurable enough, but this is an area where some real-world feedback would be helpful.

mauricio.szabo16:03:02

Sounds wonderful for me! Just a question, is there a "function API" that we could use, instead of defactory?

plexus17:03:36

You can pass maps to build-val and friends

plexus17:03:57

Have a look at the code, there's not a lot of magic

Noah Bogart18:03:46

Ayyy I built a FactoryBot like library for Typescript, was thinking about something like this for Clojure. Can't wait it read this over, see how it feels in use

Noah Bogart18:03:19

Want questions/comments here?

plexus19:03:31

Or in #lambdaisland or in DM, it's all good

👍 1