June 21, 2019
Runs the test case in 0.2-0.3 seconds:
Weights 8 KB, has 4 files, 1 folder.
Runs the text case in 1.1-1.2 seconds:
Weights 984 KB, has 27 files, 7 folders.
1.2 seconds to run such a simple test case and function seems way too much, anyway, bearable, I guess…
Takes around 7 seconds to run the first time, runs at about 1.6-2 seconds subsequently:
Weights 74.8 MB, has 14604 files, 1690 folders.
75 MB and more than 14k files to run (poorly) a test case and an oneline function. You may argue that the other examples didn’t include some stuff like the testing framework itself, and you’d be right, but consider that the whole source code for xUnit (C#) is 4MB and 700 files, so I don’t think it would make much of a difference.
Taking a look inside the node_modules its an adventure in its own, maybe a blogpost for another day.
I won’t lie, it worries me that we are willing to put up with such amounts of unecessary dependencies and complexity, but it worries me even more that we have normalized this situation. We have started to suffer from this dependency hell, with packages trying to steal credentials or even bitcoins, getting more common each time.