How It Started
Jest was created by Christoph Nakazawa at Facebook in 2014. At the time, Facebook's JavaScript codebase was enormous and growing rapidly, and the existing testing tools, primarily Jasmine and Mocha, couldn't keep up. Jasmine required manual setup for mocking, Mocha needed separate assertion libraries, and neither was designed for the scale Facebook operated at. Nakazawa built Jest as a wrapper around Jasmine initially, but it quickly evolved into a standalone framework with its own assertion library, mocking system, and test runner. The breakthrough came with Jest 15 in 2016, which introduced automatic mocking, snapshot testing, and the interactive watch mode that made the developer experience dramatically better. React's official documentation began recommending Jest, and since React was exploding in popularity, Jest rode that wave. By 2018, the npm download numbers showed Jest had surpassed Mocha as the most popular JavaScript test runner. Facebook eventually transferred the project to the OpenJS Foundation in 2022.
The Unknown Fact
Jest's snapshot testing feature, where you serialize a component's rendered output and compare it against a stored reference file, was actually controversial inside Facebook before it was released publicly. The internal debate centered on whether snapshot tests provided genuine confidence or just created a false sense of coverage. The concern was that developers would blindly update snapshots when they changed, without actually reviewing whether the changes were intentional. That debate turned out to be prophetic: snapshot testing became one of the most misused features in the JavaScript ecosystem, with many teams generating thousands of snapshots that nobody reviewed. The Jest team eventually softened their promotion of the feature, and modern best practices recommend using snapshots sparingly for stable, well-defined outputs rather than entire component trees.
Jest runs each test file in its own sandboxed Node.js context using the vm module, which is why tests don't leak global state between files. This isolation is brilliant for reliability but is also why Jest's startup time is slower than newer alternatives like Vitest, which use native ES modules instead of the vm sandbox.
Visit: jestjs.io