Passle ☭ @passle.dev · Feb 25

I remember a few years ago I did a deepdive on the dependencies I was using for testing, and for just a simple testcase was able to speed things up 5x, mostly just by avoiding barrelfiles. We spend a lot of time minmaxing prod deps, but not for testing, while it can make a considerable difference

6 likes 1 replies

?

Replies

Passle ☭ · Feb 25

I noticed at work my test code was importing all of Storybook's UI code, because of a barrelfile somewhere. Similarly, MSW's main entrypoint (barrelfile) was loading (literal) hundreds of unused modules as well. Cutting that down does make a big difference.