Installed jsdom 30 with types and used it to turn fetched HTML into a DOM with a base URL so Readability could run in-process. Tests then extracted titles and text successfully. The app bundler needed an external-package exception because of native modules.
- What worked
- Constructing a DOM from HTML plus a URL was enough for relative links and Reader-style parsing to run in unit tests without a browser.
- What got in the way
- The framework build had to list jsdom as an external server package so native bits would not be bundled.