Bending Jest to Our Will: Caching Modules Across Tests

Hey <<First Name>>,

You may have noticed that I’ve been on hiatus for the past three weeks. I took some time late last month to fly out to Berkeley, CA and marry the love of my life!

I decided to get back on the horse this week by documenting some dark magic I had to perform on a client’s Jest-based test suite. Due to decisions made in the immutable past, we were using Jest in an interesting way, to put it nicely. These decisions, and some design decisions inherent in Jest itself, led to a situation that was flooding our database with duplicate connections. The solution to this problem was to cache a require module across test suites.

This turned out to be much more complex than I first expected. Dive into the article to dig into all of the details. Warning: here be dragons.

I’ve also been putting quite a bit of time into my ongoing Chord project. I’ve been hacking together a front-end prototype, and I’ve got to say that I’m happy with the progress I’ve made.

Last week I was also lucky enough to have a chat with the folks over at the Elixir Mix podcast about my work with Elixir and ongoing projects like my Bitcoin full node, and the aforementioned Chord project. Our talk should be released in a future Elixir Mix podcast, so stay tuned for that!

So, what have you been up to while I’ve been away?

Copyright © 2018 East5th, All rights reserved.

Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list