All posts

testing

I upgraded DOMPurify, so why did I end up fixing happy-dom?

After deleting pnpm-lock.yaml and reinstalling, caret-range packages all jumped at once and sanitize tests broke. I isolated them one by one and pinned DOMPurify as the culprit, but the same version was fine on jsdom. Here is how I separated the version from the environment and traced it down to the root cause.

17 min readtestingdompurifyhappy-dom

Published

Jul 14, 2026

Reading time

17 min

Sections

8

On this page8