Why 130 Passing Tests Still Failed to Catch Critical Browser Extension Bugs
A developer building Longshot, a Firefox screenshot extension, discovered that a fully green Node.js test suite of 130 passing assertions missed two significant bugs in the print pipeline. The first bug caused the print dialog to hang indefinitely because an image decode promise never resolved inside a CSS-hidden subtree created by the print stylesheet — a browser-specific behaviour unreachable by Node-based tests. The second bug occurred when selecting PDF output broke the 'Open in editor' feature, as an internal stage passed a PDF blob to a function that cannot decode that format. Both failures existed at boundaries — either between the code and a browser API, or between two internal components — rather than within the individually tested functions themselves. The developer concluded that the test suite was not under-covering the code but was fundamentally the wrong shape to represent boundary interactions, and introduced an HTML harness running real page logic against stubbed browser APIs to catch such failures.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in