The whole test suite for Preact, a modern framework to build web apps, runs in approximately 1s. It's composed of 1003 tests at the time of this writing that run in the browser and assert against the real DOM. For Preact though, we have to write to the DOM which is a form of shared state. This simple add() function doesn't need isolation at all.

8m read timeFrom marvinh.dev
Post cover image
Table of contents
Establishing a baselineBlast from the pastLiving in an isolated worldGlobal statePreact's test setupLet's make test suites fast

Sort: