Company
Date Published
Author
Yew Leong
Word count
3612
Language
English
Hacker News points
168

Summary

The author of the text was trying to run a test suite for their internal Cloudflare instance using `yarn test`, but it kept hanging and eventually crashing after approximately 27 seconds. The problem was caused by Jest, a JavaScript testing framework, running a command called `sl` (which is actually a fun little joke program from 1993) multiple times in parallel. The `sl` command is responsible for creating an animated steam locomotive that chugs through the terminal. The author noticed that the `sl` command was being run 4 times concurrently by Jest, which took around 6.7 seconds to complete each time. This meant that the total execution time of the 4 concurrent commands would be around 27 seconds, causing the test suite to hang and eventually crash. The issue was resolved when the author renamed the `sl` command to something else, effectively removing the naming clash between Jest's `sl` and the joke program.